#include <iostream>
using namespace std;
int n;
long long k[100005];
int main(){
  cin>>n;
  for(int i=0;i<n;++i){
    cin>>k[i];
  }
  long long mon=2,mmon=2;
  for(int i=n-1;i>=0;--i){
    long long a=mon/k[i]*k[i];
    if(a<mon) mon=k[i]+a;
    else mon=a;
    mmon=mmon/k[i]*k[i]+(k[i]-1);
    if(mmon<mon){
      cout<<"-1"<<endl;
      return 0;
    }
  }
  cout<<mon<<" "<<mmon<<endl;
}