import sys



def solve():

    input = sys.stdin.readline

    K = int(eval(input()))

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

    if A[K-1] != 2: print((-1))

    else:

        minN, maxN = 2, 3

        for i in reversed(list(range(K - 1))):

            lb = (minN - 1) // A[i]

            hb = maxN // A[i]

            if lb == hb: 

                print((-1))

                break

            else:

                minN = A[i] * (lb + 1)

                maxN = A[i] * hb + A[i] - 1

        else: print((minN, maxN))

    return 0



if __name__ == "__main__":

    solve()
import sys



def solve():

    input = sys.stdin.readline

    K = int(eval(input()))

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

    if A[K-1] != 2: print((-1))

    else:

        minK, maxK = 2, 3

        for i in reversed(list(range(K - 1))):

            mod = A[i]

            lb, hb = (minK - 1) // mod, maxK // mod

            if lb >= hb: 

                print((-1))

                break

            else:

                minK = mod * (lb + 1)

                maxK = mod * (hb + 1) - 1

        else: print((minK, maxK))



    return 0



if __name__ == "__main__":

    solve()
import sys


def solve():
    input = sys.stdin.readline
    K = int(eval(input()))
    A = [int(a) for a in input().split()]
    if A[K - 1] != 2:
        print((-1))
    else:
        minN, maxN = 2, 3
        for i in reversed(list(range(K - 1))):
            lb = (minN - 1) // A[i]
            hb = maxN // A[i]
            if lb == hb:
                print((-1))
                break
            else:
                minN = A[i] * (lb + 1)
                maxN = A[i] * hb + A[i] - 1
        else:
            print((minN, maxN))
    return 0


if __name__ == "__main__":
    solve()

import sys


def solve():
    input = sys.stdin.readline
    K = int(eval(input()))
    A = [int(a) for a in input().split()]
    if A[K - 1] != 2:
        print((-1))
    else:
        minK, maxK = 2, 3
        for i in reversed(list(range(K - 1))):
            mod = A[i]
            lb, hb = (minK - 1) // mod, maxK // mod
            if lb >= hb:
                print((-1))
                break
            else:
                minK = mod * (lb + 1)
                maxK = mod * (hb + 1) - 1
        else:
            print((minK, maxK))
    return 0


if __name__ == "__main__":
    solve()

-        minN, maxN = 2, 3 +        minK, maxK = 2, 3 -            lb = (minN - 1) // A[i] -            hb = maxN // A[i] -            if lb == hb: +            mod = A[i] +            lb, hb = (minK - 1) // mod, maxK // mod +            if lb >= hb: -                minN = A[i] * (lb + 1) -                maxN = A[i] * hb + A[i] - 1 +                minK = mod * (lb + 1) +                maxK = mod * (hb + 1) - 1 -            print((minN, maxN)) +            print((minK, maxK))