#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
	ll k; cin >> k;
	ll a[k];
	for(ll i = 0; i < k; i++) cin >> a[i];
	ll ana = 2, bi = 2;
	for(ll i = k - 1; i >= 0; i--){
		ana = ana / a[i] * a[i] + !!(ana % a[i]) * a[i];
		bi = bi / a[i] * a[i] + a[i] - 1;
		if(ana > bi){
			cout << -1 << endl;
			return 0;
		}
	}
	cout << ana << " " << bi << endl;
	return 0;
}