#include<bits/stdc++.h>
using namespace std;
typedef long long int uli;
int main(){
  int n;
  scanf("%d",&n);
  vector<uli>a(n);
  for(int i=0;i<n;i++)scanf("%lld",&a[i]);
  uli l=2,r=2;
  for(int i=n-1;i>=0;i--){
    uli m=a[i];
    uli from=((l+m-1)/m)*m;
    uli to=(r/m)*m;
    if(from>to){
      puts("-1");
      return 0;
    }
    l=from;
    r=to+m-1;
  }
  printf("%lld %lld\n",l,r);
  return 0;
}
