#include <iostream>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
using namespace std;
int main(void){
    int k; cin>>k;
    long int a[100001];
    ROF(i,0,k) cin>>a[i];
    long int x=2,y=3;
    bool fl=true;
    FOR(i,0,k){
        x=((x-1)/a[i]+1)*a[i];
        y=((y-1)/a[i]+1)*a[i];
        if(x>=y) fl=false;
    }
    if(fl) cout<<x<<" "<<y-1<<endl;
    else cout<<-1<<endl;
}
