#include <iostream>
using namespace std
short int v[999];
int main()
{
short int n,i,k,a=0,b=0;
cin>>n;
for(i=1; i<=n; i++)
{
cin>>k;
v[k]=1;}
for (i=999;i>99; i--)
if (v[i]==0) {b=i; break;}
if (b!=0)&&(b>100)
{ for (i=b; i>99; i--)
if (v[i]==0) {a=i; break;}
} else cout<<“Nu exista”;
if (a!=0) cout<<a<<“ “<<b;
else cout<<“ nu exista”;
return 0;
}