#include<bits/stdc++.h>
using namespace std;
int a[1000];
int main()
{
int n;
bool failed = 0;
cin >> n;
for(int i = 0; i < n; ++i)
{
cin >> a[i];
}
for(int i = 0; i < n-1; ++i)
{
int x = abs(a[i+1] - a[i]);
for(int j = 0; j < n; ++i)
{
if(x != a[j])
{
failed = 1;
goto end;
}
}
}
end:if(failed)
{
cout << "Not jolly";
}
else
{
cout << "Jolly";
}
return 0;
}