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

int main() {
  int k;
  cin >> k;

  vector<int> a(k);
  for (auto &i : a) cin >> i;
  reverse(a.begin(), a.end());

  int64_t mina = 2, maxa = 2;
  for (int i = 0; i < k; ++i) {
    mina = (mina + a[i] - 1) / a[i] * a[i];
    maxa = maxa / a[i] * a[i] + a[i] - 1;
    if (mina > maxa) {
      cout << -1 << endl;
      return 0;
    }
  }

  cout << mina << " " << maxa << endl;
}
