// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define F first

#define S second

#define pii pair<int, int>

#define eb emplace_back

#define all(v) v.begin(), v.end()

#define rep(i, n) for (int i = 0; i < (n); ++i)

#define rep3(i, l, n) for (int i = l; i < (n); ++i)

#define chmax(a, b) a = (a >= b ? a : b)

#define chmin(a, b) a = (a <= b ? a : b)

#define out(a) cout << a << endl

#define outa(a, n) { rep(_, n) cout << a[_] << " "; cout << endl; }

#define outp(a, n) { cout << endl; rep(_, n) cout << a[_].F << " " << a[_].S << endl; }

#define sz(v) (int)v.size()

#define inf (int)(1e9+7)

#define abs(x) (x >= 0 ? x : -(x))

#define ceil(a, b) a / b + !!(a % b)

#define FIX(a) fixed << setprecision(a)

#define LB(v, n) (int)(lower_bound(all(v), n) - v.begin())

#define UB(v, n) (int)(upper_bound(all(v), n) - v.begin())

ll pow(ll a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; }

template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }





int k;

vector<int> a(100000);



ll bin(int key) {

    ll l = 0, r = (ll)k * inf;

    

    while (1) {

        // out(l << " " << r);

        ll mid = (l + r) / 2;

        

        ll M = mid;

        rep(i, k) {

            mid -= mid % a[i];

        }

        

        if (key == 0) {

            if (mid >= 2) r = M;

            else l = M;

        } else {

            if (mid <= 2) l = M;

            else r = M;

        }

        if (l + 1 == r) break;

    }

    if (key == 0) return r;

    return l;

}



int main() {

    cin >> k;

    rep(i, k) cin >> a[i];

    

    ll a = bin(0), b = bin(1);

    if (a > b) out(-1);

    else out(a << " " << b);

    

}


// Faster C++ solution for the same problem (measured speedup: 1.3953708440336654x):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define F first

#define S second

#define pii pair<int, int>

#define eb emplace_back

#define all(v) v.begin(), v.end()

#define rep(i, n) for (int i = 0; i < (n); ++i)

#define rep3(i, l, n) for (int i = l; i < (n); ++i)

#define chmax(a, b) a = (a >= b ? a : b)

#define chmin(a, b) a = (a <= b ? a : b)

#define out(a) cout << a << endl

#define outa(a, n) { rep(_, n) cout << a[_] << " "; cout << endl; }

#define outp(a, n) { cout << endl; rep(_, n) cout << a[_].F << " " << a[_].S << endl; }

#define sz(v) (int)v.size()

#define inf (int)(1e9+7)

#define abs(x) (x >= 0 ? x : -(x))

#define ceil(a, b) a / b + !!(a % b)

#define FIX(a) fixed << setprecision(a)

#define LB(v, n) (int)(lower_bound(all(v), n) - v.begin())

#define UB(v, n) (int)(upper_bound(all(v), n) - v.begin())

ll pow(ll a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; }

template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }









int main() {

    

    

    int k;

    cin >> k;

    vector<int> a(k);

    rep(i, k) cin >> a[i];

    

    ll u = 2, d = 2;

    for (int i = k - 1; i >= 0; --i) {

        ll x = (d + (a[i] - 1)) / a[i] * a[i];

        ll y = u / a[i] * a[i] + (a[i] - 1);

        u = y;

        d = x;

    }

    if (d > u) out(-1);

    else out(d << " " << u);

}