seq = []
while True:
x = int(input())
if x != 0:
seq.append(x)
else:
break
print(sum(seq) / len(seq))
seq = []
while True:
x = int(input())
if x != 0:
seq.append(x)
else:
break
print(sum(seq) / len(seq))