#include <cstdio>
const int K = 100050;
int A[K];
int main() {
  int k;
  scanf("%d", &k);
  for (int i = 0; i < k; ++i) scanf("%d", &A[i]);
  if (A[k - 1] != 2) return puts("-1") & 0;
  int l = 2, r = 2;
  for (int i = k - 1; ~i; --i) {
    l = (l + A[i] - 1) / A[i] * A[i];
    r = r / A[i] * A[i] + A[i] - 1;
    if (r < l) return puts("-1") & 0;
  }
  printf("%d %d\n", l, r);
  return 0;
}