#include <bits/stdc++.h>

typedef long long int int64;
int64 arr[100003];
int n;
int64 a,b;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;++i) {
		scanf("%lld",&arr[i]);
	}
	a = 2,b = 2;
	for(int i = n - 1;i >= 0;--i) {
		int64 cur = arr[i];
		a = ((a - 1) / cur + 1) * cur,b = (b / cur + 1) * cur - 1;
		if(a > b) {
			printf("-1\n");
			return 0;
		}
	}
	printf("%lld %lld\n",a,b);
	return 0;
}