from sys import stdout

import sys,resource

printn = lambda x: stdout.write(x)

inn = lambda : int(eval(input()))

inl   = lambda: list(map(int, input().split()))

inm   = lambda:      list(map(int, input().split()))

DBG = True  and False

BIG = 999999999

R = 10**9 + 7



def ddprint(x):

  if DBG:

    print(x)



k = inn()

a = inl()

if k==1:

    if a[0]==2:

        print("2 3")

    else:

        print((-1))

    exit()

l = r = 2

for i in range(k-1,-1,-1):

    mn = ((l+a[i]-1)//a[i])*a[i]

    mx = (r//a[i])*a[i]+a[i]-1

    if mn>mx:

        print((-1))

        exit()

    l = mn

    r = mx

print(("{} {}".format(l,r)))

from sys import stdout

printn = lambda x: stdout.write(str(x))

inn = lambda : int(eval(input()))

inl   = lambda: list(map(int, input().split()))

inm   = lambda:      list(map(int, input().split()))

ins = lambda : input().strip()

DBG = True # and False

BIG = 999999999

R = 10**9 + 7



def ddprint(x):

  if DBG:

    print(x)



k = inn()

a = inl()

l = r = 2

for i in range(k-1,-1,-1):

    nl = ((l+a[i]-1)//a[i])*a[i]

    nr = (r//a[i])*a[i] + a[i]-1

    #ddprint("l {} r {} nl {} nr {}".format(l,r,nl,nr))

    if r<nl or nr<l:

        print((-1))

        exit()

    l = nl

    r = nr

print(("{} {}".format(l,r)))

from sys import stdout
import sys, resource

printn = lambda x: stdout.write(x)
inn = lambda: int(eval(input()))
inl = lambda: list(map(int, input().split()))
inm = lambda: list(map(int, input().split()))
DBG = True and False
BIG = 999999999
R = 10**9 + 7


def ddprint(x):
    if DBG:
        print(x)


k = inn()
a = inl()
if k == 1:
    if a[0] == 2:
        print("2 3")
    else:
        print((-1))
    exit()
l = r = 2
for i in range(k - 1, -1, -1):
    mn = ((l + a[i] - 1) // a[i]) * a[i]
    mx = (r // a[i]) * a[i] + a[i] - 1
    if mn > mx:
        print((-1))
        exit()
    l = mn
    r = mx
print(("{} {}".format(l, r)))

from sys import stdout

printn = lambda x: stdout.write(str(x))
inn = lambda: int(eval(input()))
inl = lambda: list(map(int, input().split()))
inm = lambda: list(map(int, input().split()))
ins = lambda: input().strip()
DBG = True  # and False
BIG = 999999999
R = 10**9 + 7


def ddprint(x):
    if DBG:
        print(x)


k = inn()
a = inl()
l = r = 2
for i in range(k - 1, -1, -1):
    nl = ((l + a[i] - 1) // a[i]) * a[i]
    nr = (r // a[i]) * a[i] + a[i] - 1
    # ddprint("l {} r {} nl {} nr {}".format(l,r,nl,nr))
    if r < nl or nr < l:
        print((-1))
        exit()
    l = nl
    r = nr
print(("{} {}".format(l, r)))

-import sys, resource -printn = lambda x: stdout.write(x) +printn = lambda x: stdout.write(str(x)) -DBG = True and False +ins = lambda: input().strip() +DBG = True  # and False -if k == 1: -    if a[0] == 2: -        print("2 3") -    else: -        print((-1)) -    exit() -    mn = ((l + a[i] - 1) // a[i]) * a[i] -    mx = (r // a[i]) * a[i] + a[i] - 1 -    if mn > mx: +    nl = ((l + a[i] - 1) // a[i]) * a[i] +    nr = (r // a[i]) * a[i] + a[i] - 1 +    # ddprint("l {} r {} nl {} nr {}".format(l,r,nl,nr)) +    if r < nl or nr < l: -    l = mn -    r = mx +    l = nl +    r = nr