#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
int n, a[233333];
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  ll l = 2, r = 2;
  for (i = n; i; i--) {
    ll L = 1 + (l - 1) / a[i], R = r / a[i];
    if (L > R) return printf("-1"), 0;
    L = L * a[i]; R = R * a[i];
    l = L; r = R + a[i] - 1;
  }
  cout << l << " " << r << endl;
  return 0;
}
