# AGC020B - Ice Rink Game

def main():

    K, *A = list(map(int, open(0).read().split()))

    if A.pop() != 2:

        print((-1))

        return

    mn, mx = 2, 3

    for i in A[::-1]:

        if i > mx:

            print((-1))

            return

        mx = mx // i * i + i - 1

        mn = ((mn + i - 1) // i) * i

    if mn > mx:

        print((-1))

    else:

        print((mn, mx))





if __name__ == "__main__":

    main()
# AGC020B - Ice Rink Game

def main():

    K, *A = list(map(int, open(0).read().split()))

    l, h = 2, 2  # low, high

    for i in A[::-1]:

        l += -l % i

        h += i - 1 - h % i

    if l > h:

        print((-1))

    else:

        print((l, h))





if __name__ == "__main__":

    main()
# AGC020B - Ice Rink Game
def main():
    K, *A = list(map(int, open(0).read().split()))
    if A.pop() != 2:
        print((-1))
        return
    mn, mx = 2, 3
    for i in A[::-1]:
        if i > mx:
            print((-1))
            return
        mx = mx // i * i + i - 1
        mn = ((mn + i - 1) // i) * i
    if mn > mx:
        print((-1))
    else:
        print((mn, mx))


if __name__ == "__main__":
    main()

# AGC020B - Ice Rink Game
def main():
    K, *A = list(map(int, open(0).read().split()))
    l, h = 2, 2  # low, high
    for i in A[::-1]:
        l += -l % i
        h += i - 1 - h % i
    if l > h:
        print((-1))
    else:
        print((l, h))


if __name__ == "__main__":
    main()

-    if A.pop() != 2: -        print((-1)) -        return -    mn, mx = 2, 3 +    l, h = 2, 2  # low, high -        if i > mx: -            print((-1)) -            return -        mx = mx // i * i + i - 1 -        mn = ((mn + i - 1) // i) * i -    if mn > mx: +        l += -l % i +        h += i - 1 - h % i +    if l > h: -        print((mn, mx)) +        print((l, h))