#include<cstdio>
#include<algorithm>
using namespace std;
int n;
long long a[100005],mn,mx;
int main()
{
	scanf("%d",&n);for(int i=1;i<=n;++i) scanf("%lld",&a[i]);
	if(a[n]!=2) {printf("-1");return 0;}mn=2;mx=3;
	for(int i=n-1;i;--i) {
		mn=((mn-1)/a[i]+1)*a[i];
		mx=(mx/a[i])*a[i]+a[i]-1;
		if(mn>mx) {printf("-1");return 0;}
	}
	printf("%lld %lld",mn,mx);
	return 0;
}
/*
mx=2 a[i]=3 at most 0
mn=17 a[i]=9 at most 1
mn=18 a[i]=9 at most 2
mx=
*/