#include<cstdio>
#include<cstring>
typedef long long ll;
int n;
ll a[100005],ans1=2,ans2=2;
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&a[i]);
	for(int i=n;i;i--){
		if(ans1%a[i])ans1/=a[i],ans1=ans1*a[i]+a[i];
		ans2=(ans2/a[i]+1)*a[i]-1;
	}
	if(ans1>ans2)puts("-1");
	else printf("%lld %lld\n",ans1,ans2);
	return 0;
}