#include <bits/stdc++.h>
#define ll long long
#define N 100009
using namespace std;
int n,a[N];
int main()
{
	cin>>n;
	for (int i=1;i<=n;i++) cin>>a[i];
	ll Min=2,Max=2;
	for (int i=n;i;i--)
	{
		ll x=Min/a[i]*a[i];
		if (x<Min) x+=a[i];
		ll y=Max/a[i]*a[i]+(a[i]-1);
		Min=x,Max=max(Max,y);
	}
	if (Min>Max) puts("-1");
	else printf("%lld %lld\n",Min,Max);
	return 0;
}
