#include <bits/stdc++.h>
#define rep(i, n) REP(i, 0, n)
#define REP(i, l, r) for (int i = l; i < r; ++i)
#define int long long
using namespace std;
typedef pair<int, int> P;
template <typename DATA_TYPE, typename LAZY_TYPE, typename F, typename G,
    typename H>
class SegmentTree {
private:
  size_t size;

  F f;
  G g;
  H h;

  std::vector<DATA_TYPE> data;
  std::vector<LAZY_TYPE> lazy;
  DATA_TYPE data_init;
  LAZY_TYPE lazy_init;

  SegmentTree() : size(0) {}

  void eval(int length, size_t index) {
    if (lazy[index] == lazy_init)
      return;
    if (index * 2 + 1 < size * 2 - 1) {
      lazy[index * 2 + 1] = h(lazy[index * 2 + 1], lazy[index]);
      lazy[index * 2 + 2] = h(lazy[index * 2 + 2], lazy[index]);
    }
    data[index] = g(data[index], lazy[index], length);
    lazy[index] = lazy_init;
  }

  DATA_TYPE update(size_t begin, size_t end, LAZY_TYPE update_value,
                   size_t index, size_t left, size_t right) {
    eval(right - left, index);
    if (right <= begin || end <= left)
      return data[index];
    if (begin <= left && right <= end) {
      lazy[index] = h(lazy[index], update_value);
      return g(data[index], lazy[index], right - left);
    }
    return data[index] = f(update(begin, end, update_value, index * 2 + 1, left,
                                  (left + right) / 2),
                           update(begin, end, update_value, index * 2 + 2,
                                  (left + right) / 2, right));
  }

  DATA_TYPE query(size_t begin, size_t end, size_t index, size_t left,
                  size_t right) {
    eval(right - left, index);
    if (right <= begin || end <= left)
      return data_init;
    if (begin <= left && right <= end)
      return data[index];
    return f(query(begin, end, index * 2 + 1, left, (left + right) / 2),
             query(begin, end, index * 2 + 2, (left + right) / 2, right));
  }

public:
  SegmentTree(size_t data_size, F f, G g, H h, DATA_TYPE data_init,
              LAZY_TYPE lazy_init)
      : f(f), g(g), h(h), data_init(data_init), lazy_init(lazy_init) {
    size = 1;
    while (size < data_size)
      size <<= 1U;
    data.resize(2 * size - 1, data_init);
    lazy.resize(2 * size - 1, lazy_init);
  }

  void build(std::vector<DATA_TYPE> input_data) {
    if (input_data.size() > size) {
      std::cerr << "segment tree::build : input oversize data\n";
      exit(-1);
    }
    for (int i = 0; i < input_data.size(); ++i) {
      data[i + size - 1] = input_data[i];
    }
    for (int i = size - 2; i >= 0; --i) {
      data[i] = f(data[i * 2 + 1], data[i * 2 + 2]);
    }
  }

  void update(size_t begin, size_t end, LAZY_TYPE update_value) {
    update(begin, end, update_value, 0, 0, size);
  }

  DATA_TYPE query(size_t begin, size_t end) {
    return query(begin, end, 0, 0, size);
  }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int k;
  cin >> k;
  vector<int> a(k);
  rep(i, k) { cin >> a[i]; }
  int l = 2, r = 2;
  for (int i = k - 1; i >= 0; i--) {
    if (r / a[i] - (l - 1) / a[i] == 0) {
      cout << -1 << endl;
      return 0;
    }
    l = ((l+a[i]-1)/a[i])*a[i];
    r = (r / a[i]) * a[i] + a[i] - 1;
  }
  cout << l << " " << r << endl;
}

Measured memory_bytes: 1024