f=open("17.txt")
a=[int(x) for x in f]
m=max(a)
k=0
mx=-100000
for i in range(len(a)-2):
x=a[i]
y=a[i+1]
z=a[i+2]
c=0
if '0' not in str(x):
c+=1
if '0' not in str(y):
c+=1
if '0' not in str(z):
c+=1
s=x+y+z
if c>=2 and s<m/2:
k+=1
if s>mx:
mx=s
print(k,mx)