#include<bits/stdc++.h>
using namespace std;
int n, a[1010], b[1010];
int main(){
cin >> n;
for (int i = 0; i < n; i++){
cin >> a[i];
}
for (int i = 1; i < n; i++){
b[i] = abs(a[i]-a[i-1]);
}
bool x = 1;
for (int i = 1; i < n; i++){
bool bb = 0;
for (int j = 0; j < n; j++){
if (a[j] == b[i]){
bb = 1;
break;
}
}
if (bb == 0){
x = 0;
break;
}
}
if (x){
cout << "Jolly";
}else{
cout << "Not jolly";
}
return 0;
}