#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	int k; cin >> k;
	vector<int> a(k);
	for (int i = 0; i < k; ++i) cin >> a[i];
	long long mn = 2, mx = 2;
	for (int i = k - 1; i >= 0; --i) {
		mn = (mn + a[i] - 1) / a[i];
		mx /= a[i];
		if (mn > mx) return cout << -1 << '\n',0;
		mn *= a[i];
		mx = (mx + 1) * a[i] - 1;
	}
	cout << mn << ' ' << mx << '\n';
}