407009: GYM102680 D One

Memory Limit:1024 MB Time Limit:5 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Onetime limit per test5 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard output

Hooray! It's time for the obligatory problem concerning the random mathematical properties of an arbitrary number! And since today is the 1st Brookfield Computer Programming Challenge, this year's number is 1!

One is a pretty unique number. Of course, it is the multiplicative identity (that is x*1 = x), as well as the smallest natural number. It is sometimes called the loneliest number, the maximum value of Random.nextDouble(), the magnitude of any unit vector, and the only positive number that is a valid digit in any base, as well as power of 2 itself ($$$2^0 = 1$$$, oh joy!). It is also both the second and third Fibonacci number (0, 1, 1, 2, 3, 5, 8...). In fact, it is the only number to appear a prime number of times in the Fibonacci sequence.

Speaking of primes, whether or not 1 is a prime number has been discussed quite fervently among mathematicians. A prime is a number with exactly two unique natural factors. A composite number is a number with more than two unique natural factors. 7, for example, has factors of 1 and 7, but no others, making it prime. 9 has factors of 1, 3, and 9, making it composite. 1, however, is only divisible by 1, and is therefore neither prime nor composite. Interestingly, 1 is the only number with this property.

Given $$$n$$$ natural numbers, decide whether each of them is prime, composite, or neither. Be careful that your program finishes execution within 5 seconds for any valid input.

Input

The first line will contain an integer $$$n$$$, the number of natural numbers to compute. $$$n$$$ lines follow, each containing a single integer $$$q_i$$$

$$$1 \leq n \leq 100$$$

$$$1 \leq q_i \leq 2*10^9$$$

Output

Output $$$n$$$ lines, each containing either "Prime", "Composite", or "Neither", depending on the state of each number.

ExampleInput
4
9
1
2017
1000000007
Output
Composite
Neither
Prime
Prime
Note

9 has 3 factors: 1,3, and 9, and is therefore composite.

1 is discussed in the problem statement.

2017 only has factors of 1 and itself, and is therefore prime.

1000000007 also happens to be prime for the same reason.

加入题单

上一题 下一题 算法标签: