#include <iostream>
#include <algorithm>

using namespace std;

int main(){
	int i,k;
	cin >> k;
	long long a[100010],mn=2,mx=2;
	for(i=0;i<k;i++){
		cin >> a[k-1-i];
	}
	if(a[0]!=2){
		cout << -1 << endl;
		return 0;
	}
	
	for(i=1;i<k;i++){
		mn = ((mn-1)/a[i]+1)*a[i];
		mx = (mx+a[i-1]-1)/a[i]*a[i];
		if(mn>mx){
			cout << -1 << endl;
			return 0;
		}
	}
	mx = mx+a[k-1]-1;
	cout << mn <<" " <<  mx << endl;
}