from functools import reduce

def gcd(a, b):

    while b: a, b = b, a % b

    return a

def lcm(a, b):

    return b//gcd(a, b)*a



P = 10**9+7

N = int(eval(input()))

A = [int(a) for a in input().split()]

print((reduce(lcm, A) % P * sum([pow(a, P-2, P) for a in A]) % P))
def primeFactor(N):

    i, n, ret, d, sq = 2, N, {}, 2, 99

    while i <= sq:

        k = 0

        while n % i == 0: n, k, ret[i] = n//i, k+1, k+1

        if k > 0 or i == 97: sq = int(n**(1/2)+0.5)

        if i < 4: i = i * 2 - 1

        else: i, d = i+d, d^6

    if n > 1: ret[n] = 1

    return ret



P = 10**9+7

D = {}

N = int(eval(input()))

A = [int(a) for a in input().split()]

t = 0

for a in A:

    t += pow(a, P-2, P)

    pf = primeFactor(a)

    for p in pf:

        if p in D:

            D[p] = max(D[p], pf[p])

        else:

            D[p] = pf[p]

s = 1

for f in D:

    s = (s * pow(f, D[f], P)) % P

print((s * t % P))
from functools import reduce


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return b // gcd(a, b) * a


P = 10**9 + 7
N = int(eval(input()))
A = [int(a) for a in input().split()]
print((reduce(lcm, A) % P * sum([pow(a, P - 2, P) for a in A]) % P))

def primeFactor(N):
    i, n, ret, d, sq = 2, N, {}, 2, 99
    while i <= sq:
        k = 0
        while n % i == 0:
            n, k, ret[i] = n // i, k + 1, k + 1
        if k > 0 or i == 97:
            sq = int(n ** (1 / 2) + 0.5)
        if i < 4:
            i = i * 2 - 1
        else:
            i, d = i + d, d ^ 6
    if n > 1:
        ret[n] = 1
    return ret


P = 10**9 + 7
D = {}
N = int(eval(input()))
A = [int(a) for a in input().split()]
t = 0
for a in A:
    t += pow(a, P - 2, P)
    pf = primeFactor(a)
    for p in pf:
        if p in D:
            D[p] = max(D[p], pf[p])
        else:
            D[p] = pf[p]
s = 1
for f in D:
    s = (s * pow(f, D[f], P)) % P
print((s * t % P))

-from functools import reduce - - -def gcd(a, b): -    while b: -        a, b = b, a % b -    return a - - -def lcm(a, b): -    return b // gcd(a, b) * a +def primeFactor(N): +    i, n, ret, d, sq = 2, N, {}, 2, 99 +    while i <= sq: +        k = 0 +        while n % i == 0: +            n, k, ret[i] = n // i, k + 1, k + 1 +        if k > 0 or i == 97: +            sq = int(n ** (1 / 2) + 0.5) +        if i < 4: +            i = i * 2 - 1 +        else: +            i, d = i + d, d ^ 6 +    if n > 1: +        ret[n] = 1 +    return ret +D = {} -print((reduce(lcm, A) % P * sum([pow(a, P - 2, P) for a in A]) % P)) +t = 0 +for a in A: +    t += pow(a, P - 2, P) +    pf = primeFactor(a) +    for p in pf: +        if p in D: +            D[p] = max(D[p], pf[p]) +        else: +            D[p] = pf[p] +s = 1 +for f in D: +    s = (s * pow(f, D[f], P)) % P +print((s * t % P))