#include<cstdio>
int a[100001];
int main() {
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) scanf("%d", a + i);
	long long x = 2, y = 2;
	for (int i = n; i >= 1; i--) {
		if (x%a[i] == 0) x = x / a[i] * a[i];
		else x = (x / a[i] + 1) * a[i];
		y = y / a[i] * a[i] + a[i] - 1;
	}
	if (x > y) printf("-1\n");
	else printf("%lld %lld\n", x, y);
	return 0;
}