local mfl, mce = math.floor, math.ceil
local n = io.read("*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
local curmin, curmax = 2, 2
-- a[n] = k * t[n] + l (0 <= k, 0 <= l < t[n])
-- a[n+1] = k * t[n]
for i = n, 1, -1 do
  local a = curmin
  local b = curmax + t[i] - 1
  if 1 < i then
    curmin = t[i - 1] * mce(a / t[i - 1])
    curmax = t[i - 1] * mfl(b / t[i - 1])
  else
    curmin, curmax = a, b
  end
end
if curmax < curmin then
  print(-1)
else
  print(curmin .. " " .. curmax)
end
