import math
l = 0
z = []
for i in range(50):
z[i] = float(input())
l += z[i] *z[i]
l = sqrt(l)
print(l)
import math
l = 0
z = []
for i in range(50):
z[i] = float(input())
l += z[i] *z[i]
l = sqrt(l)
print(l)