#include<cstdio>
#define int long long
int n,a[100001];
signed main()
{
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)scanf("%lld",a+i);
	int l=2,r=2;
	for(int i=n;i;i--)
	{
		l=(l/a[i]+bool(l%a[i]))*a[i];
		r=(r/a[i]+1)*a[i]-1;
		if(l>r||r<1){puts("-1");return 0;}
		//printf("%lld %lld\n",l,r);
	}
	printf("%lld %lld\n",l,r);
	return 0;
}
