#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

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