№3
a=130
b=30
t=[]
for i in range(a):
t.append(int(input()))
ww=[]
ww1=[]
ww2=[]
for i in range(130-30-30):
for j in range(30, 100):
p1=t[i:i+30]
p2=t[j:j+30]
if (sum(p1)+sum(p2))%68==0:
ww.append(sum(p1)+sum(p2))
ww1.append(p1)
ww2.append(p2)
print(max(ww))
print(ww2[1])