#include <iostream>
using namespace std;
int main(void){
    long long K,max,min;
    cin>>K;
    long long A[K],i;
    for(i=0;i<K;i++){
        cin>>A[K-1-i];
    }
    max=2;min=2;
    for(i=0;i<K;i++){
        if((min-1)/A[i]+1>max/A[i]){
            cout<<-1<<endl;
            return 0;
        }
        min=((min-1)/A[i]+1)*A[i];
        max=(max/A[i]+1)*A[i]-1;
    }
    cout<<min<<" "<<max<<endl;
}
