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

int main(){
    size_t K;
    cin >> K;
    vector<unsigned long> A(K);
    copy_n(istream_iterator<unsigned long>(cin), K, A.rbegin());
    unsigned long R{2}, L{2};
    for(const auto& i : A){
        auto r{(R + i - 1) / i}, l{L / i};
        if(r > l)return 0 & puts("-1");
        R = r * i;
        L = (l + 1) * i - 1;
    }
    cout << R << " " << L << endl;
    return 0;
}