Veshy needs help in math class. He has
Note:
An arithmetic sequence is a sequence such that it can be written in the form:
A geometric sequence is a sequence such that it can be written in the form:
It may be helpful to know that in an arithmetic sequence,
Constraints
Input Specification
The first line of input is
Each of the following
Output Specification
Your output must have
If the sequence is arithmetic, output arithmetic
.
If the sequence is geometric, output geometric
.
If the sequence is neither arithmetic nor geometric, output neither
.
If the sequence is both arithmetic and geometric, output both
.
Sample Input
4
1 2 3 4 5 6 7 8 9 10
2 4 8 16 32 64 128 256 512 1024
1 1 0 0 1 1 0 0 1 1
1 1 1 1 1 1 1 1 1 1
Sample Output
arithmetic
geometric
neither
both
Comments