Veshy needs help in math class. He has sequences of 10 spaced terms in order of . For each sequence he wants to know if it is arithmetic, geometric, or neither. Output the answer to the sequence on the line. Terms are guaranteed to be integers.
A arithmetic sequence is a sequence such that it can be written in the form: where and are constants.
A geometric sequence is a sequence such that it can be written in the form: where and are constants.
It may be helpful to know that in an arithmetic sequence, and in a geometric sequence,
In all tests,
The first line of input is .
Each the following lines contains 10 integers, , a sequence of numbers.
Your output must have lines such that the answer to the sequence is on the line.
If the sequence is arithmetic, output
If the sequence is geometric, output
If the sequence is neither arithmetic nor geometric, output
If the sequence is both arithmetic and geometric, output
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
arithmetic geometric neither both