def inpl(): return list(map(int, input().split()))



N = int(eval(input()))

print((1/sum([1/v for v in inpl()])))
def inpl(): return list(map(int, input().split()))

N = int(eval(input()))

print((1 / sum([1/a for a in inpl()])))
def inpl():
    return list(map(int, input().split()))


N = int(eval(input()))
print((1 / sum([1 / v for v in inpl()])))

def inpl():
    return list(map(int, input().split()))


N = int(eval(input()))
print((1 / sum([1 / a for a in inpl()])))

-print((1 / sum([1 / v for v in inpl()]))) +print((1 / sum([1 / a for a in inpl()])))