n = int(eval(input()))

a_list = list(map(int, input().split()))



sum = 0

for i in a_list:

    sum += 1/i



print((1/sum))
n = int(eval(input()))

a = list(map(int, input().split()))

sum = 0

for i in range(n):

    sum += 1/a[i]



print((1/sum))
n = int(eval(input()))
a_list = list(map(int, input().split()))
sum = 0
for i in a_list:
    sum += 1 / i
print((1 / sum))

n = int(eval(input()))
a = list(map(int, input().split()))
sum = 0
for i in range(n):
    sum += 1 / a[i]
print((1 / sum))

-a_list = list(map(int, input().split())) +a = list(map(int, input().split())) -for i in a_list: -    sum += 1 / i +for i in range(n): +    sum += 1 / a[i]