    #include<bits/stdc++.h>
    using namespace std;
    const int mxn = 1e5+10;
    int n;
    long long ar[mxn];
     
    int main()
    {
        cin>>n;
        for(int i = 0; i < n; i++)
            cin>>ar[i];
        long long prev = ar[n-1];
        if(prev!=2)
        {
            cout<<"-1"<<endl;
            return 0;
        }
        long long left = 2;
        long long right = 2;
        for(int i = n-1; i >= 0; i--)
        {
    		left = ((left-1)/ar[i] + 1)*ar[i];
    		right = ((right/ar[i])*ar[i]+ar[i]-1);
    		long long tmp = (right/ar[i])*ar[i];
    		
    		if(left > tmp) { cout<<"-1"<<endl; return 0;}
    	}
    	cout<<left<<" "<<right<<endl;
        return 0;
    }