#include<iostream>
#include<cstdio>
#include<cstring>
#define ll long long
using namespace std;
int n;
int num[100005];
int main()
{
	scanf("%d",&n);
	register int a,b,c,d;
	for(a=1;a<=n;a++)
	scanf("%d",&num[a]);
	ll p=2,q=2;
	for(a=n;a>=1;a--)
	{
		if(p%num[a]!=0)
		p=(p/num[a])*num[a]+num[a];
		q=(q/num[a]+1)*num[a]-1;
	}
	if(q>=p)
	cout<<p<<" "<<q<<endl;
	else
	puts("-1");
	return 0;
}