#include<bits/stdc++.h>
using namespace std;

const int N=1e5+9;
typedef long long ll;
ll a[N];

int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	ll lb=2,rb=2;
	for(int i=n;i>=1;i--)
	{
		if(lb%a[i])
			lb=(lb/a[i]+1)*a[i];
		if(rb%a[i])
			rb=rb/a[i]*a[i];
		if(lb>rb)
			return puts("-1"),0;
		rb=rb+a[i]-1;
	}

	printf("%lld %lld\n",lb,rb);
	return 0;
}
