#include<bits/stdc++.h>

using namespace std;

#define N 120000
#define LL long long

LL n,mn,mx,a[N];

int main(){
	scanf("%lld",&n);
	for (LL i=1;i<=n;i++) scanf("%lld",&a[i]);
	mn=mx=2;
	for (LL i=n;i>=1;i--){
		mx=mx/a[i]*a[i];
		mx+=a[i]-1;
		mn=(mn+a[i]-1)/a[i]*a[i];
	}
	if (mx<mn) puts("-1");
	else printf("%lld %lld\n",mn,mx);
	
	return 0;
}
			