#include<iostream>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
int n,m,cnt;
ll ans,x[100010];
int main()
{
	ll i,s,a,b,j,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++)scanf("%lld",&x[i]);
	if(x[n]!=2){printf("-1");return 0;}
	a=2;b=3;
	for(i=n-1;i;i--)
	{
		j=(a-1)/x[i]+1;k=b/x[i];
		//cout<<" "<<x[i]<<" "<<j<<" "<<k<<endl;
		if(j>k){printf("-1");return 0;}
		a=j*x[i];b=(k+1)*x[i]-1;
	}
	printf("%lld %lld",a,b);
	return 0;
}