Jolly Jumpers

Time limit1sMemory limit128 MB

Problem

Determine whether an integer sequence is a Jolly jumper.

  • A sequence of length $1$ is always a Jolly jumper.
  • A sequence of length $n \ge 2$ is a Jolly jumper if the absolute values of the differences between adjacent numbers include every integer from $1$ to $n-1$ exactly once. (There are exactly $n-1$ adjacent pairs.)

For example, the sequence 1 4 2 3 is a Jolly jumper because the absolute differences of its adjacent numbers are $3, 2, 1$, which cover all of $1$ through $3$.

Given several sequences, decide for each one whether it is a Jolly jumper.

Input

The input consists of several lines. Each line starts with the length $n$ ($1 \le n < 3000$) of a sequence, followed by $n$ integers separated by spaces. Lines are given until the end of input.

Output

For each sequence, print Jolly if it is a Jolly jumper and Not jolly otherwise, one result per line.