lst=list(map(int,input().split()))
n=len(lst)-1 #1到n-1之间
f=0
lst1=[]
z=False
lst3=[]
for i in range(1,len(lst)):
lst1.append(i)
for i in range(0,n):
x=abs(lst[i]-lst[i+1])
lst3.append(x)
if lst3.count(x)>=2:
f+=1
elif x not in lst1 or lst3.count(x)>=2 and f<=1:
print("Not jolly")
z=True
break
if z==False:
print("Jolly")