#include <iostream>
#include <cmath>
#include <vector>
long long n,input;
std::vector<long long> a;
long long s[114514];
bool flag = false;
signed int main()
{
std::cin>>n;
for(long long i = 0;i < n;i++)
{
std::cin>>input;
a.push_back(input);
}
for(long long i = 0;i < a.size()-1;i++)
{
s[abs(a[i]-a[i+1])] = 1;
}
for(long long i = 1;i < n;i++)
{
s[i] == 0?flag = true:flag = false;
}
flag?std::cout<<"Not jolly":std::cout<<"Jolly";
return 0;
}
求助