#include <bits/stdc++.h>
using namespace std;
int n, a[1005];
int num;
bool flag;
int main(){
ios::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i++){
cin >> a[i];
}
for (int i = 1; i < n; i++){
num = abs(a[i] - a[i + 1]);
for (int j = 1; j <= n; j++){
if (num == a[j]){
flag = 1;
break;
}
}
if (!flag){
cout << "Not jolly";
return 0;
}
flag = 0;
}
cout << "Jolly";
return 0;
}