#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+1;

int k, a[N];
int main() {
	cin >> k;
	for(int i = 1; i <= k; i++) cin >> a[i];
	int64_t l = 2, r = 2;
	for(int i = k; i >= 1; i--) {
		// normalize
		l = (l+a[i]-1) / a[i] * a[i];
		r = (r / a[i]) * a[i];
		// get upper bound
		r += a[i] - 1;
		if(l > r) cout << -1, exit(0);
	}
	cout << l << ' ' << r;
}