from functools import reduce

from operator import mul



n = int(eval(input()))

a_list = [int(x) for x in input().split()]



temp_mul = reduce(mul, a_list)



temp_add = 0

for a in a_list:

    temp_add += temp_mul // a



ans = temp_mul / temp_add

print(ans)
n = int(eval(input()))

a_list = [int(x) for x in input().split()]



temp = 0

for a in a_list:

    temp += 1 / a

ans = 1 / temp

print(ans)
from functools import reduce
from operator import mul

n = int(eval(input()))
a_list = [int(x) for x in input().split()]
temp_mul = reduce(mul, a_list)
temp_add = 0
for a in a_list:
    temp_add += temp_mul // a
ans = temp_mul / temp_add
print(ans)

n = int(eval(input()))
a_list = [int(x) for x in input().split()]
temp = 0
for a in a_list:
    temp += 1 / a
ans = 1 / temp
print(ans)

-from functools import reduce -from operator import mul - -temp_mul = reduce(mul, a_list) -temp_add = 0 +temp = 0 -    temp_add += temp_mul // a -ans = temp_mul / temp_add +    temp += 1 / a +ans = 1 / temp