import java.io._
import java.util.StringTokenizer
import scala.util.control.Breaks.{breakable,break}

object Main extends App {
  val in = new InputReader(System.in)
  val pw = new PrintWriter(System.out)

  val N = in.next().toInt
  val A = new Array[Long](N+1)
  for(i <- (1 to N).reverse) {
    A(i) = in.next().toLong
  }

  ///
  if (A(1) != 2)
    println(-1)
  else {
    var flag = true
    var l = 2L; var r = 3L
    breakable {
      for(i <- 2 to N) {
        val now = A(i)

        l =
          if(l % now != 0)
            (l / now + 1) * now
          else
            (l / now) * now
        r = (r / now)*now

        if(l > r) { // invalid
          flag = false
          break
        }
        else {
          r += now - 1
        }

      }
    }

    if(flag)
      println(s"$l $r")
    else
      println(-1)
  }
}


class InputReader(stream: InputStream) {
  private val reader = new BufferedReader(new InputStreamReader(stream))
  private var tokenizer: StringTokenizer = new StringTokenizer(reader.readLine())
  def next(): String = {
    while (!tokenizer.hasMoreTokens()) {
      tokenizer = new StringTokenizer(reader.readLine())
    }
    tokenizer.nextToken()
  }
}

