c[3000];main(n,a,b,k){for(;scanf("%d%d",&n,&a)+1;puts(k-1?"Not jolly":"Jolly"))for(memset(c,0,n*4),k=n;--n;a=b)scanf("%d",&b),c[abs(a-b)]++?0:k--;}