//
// main.c
// practice
//
// Created by Chen on 2018/6/24.
// Copyright © 2018年 Chen. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
int main(int argc, const char * argv[]) {
int n;
while(scanf("%d",&n)!=EOF){
int i,jolly[n],check[n],ck=0;
for(i=0;i<n;i++) scanf("%d",&jolly[i]);
for(i=1;i<n;i++) check[i]=i;
for(i=0;i<n-1;i++){
int ab=abs(jolly[i]-jolly[i+1]);
if(check[ab]==0){
printf("Not jolly\n");
ck=1;
break;
}else{
check[ab]=0;
}
}
if(!ck) printf("Jolly\n");
}
return 0;
}