#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  long long a[n];
  for(int i=0;i<n;i++){
    cin>>a[i];
    }
  long long ma,mi;
  ma=mi=2;
  for(int i=n-1;i>=0;i--){
    if(mi%a[i]!=0&&ma/a[i]==mi/a[i]){
      cout<<"-1"<<endl;
      return 0;
      }
    mi=((mi-1)/a[i])*a[i]+a[i];
    ma=(ma/a[i])*a[i]+a[i]-1;
    }
  cout<<mi<<" "<<ma<<endl;
  return 0;
  }
