#include<iostream>
using namespace std;
long long a[2000];
long long b[2000];
int main()
{
int t = 0;
int n;
cin >> n;
cin >> a[1];
for (int i = 2; i <= n; i++)
{
cin >> a[i];
b[abs(a[i] -a[i - 1])] = 1;
}
for (int i = 1; i <= n - 1; i++)
{
if (b[i] == 1)
t++;
}
if (t == n - 1)
cout << "Jolly";
else
cout << "Not jolly";
return 0;
}