#include<iostream>
using namespace std;
int main(){
int n;
int b[2000];
int flag=0;
cin>>n;
for(int i=1;i<=n;i++){
cin>>b[i];}
for(int m=1;m<=n;m++){
if(((b[m]-b[m+1] )*(b[m]-b[m+1] ))<1||((b[m]-b[m+1] )*(b[m]-b[m+1] ))>(n-1)*(n-1))
flag=1;
}
if(flag==0)
cout<<"Jolly";
if(flag==1)
cout<<"Not jolly";
flag=0;
return 0;}