Given several natural numbers, tell which are prime and which are not.
Input
Input consists of (possibly, many) natural numbers n ≤ 106.
Output
For each n, tell if it is prime or not.
Observation
Use the Sieve of Eratosthenes.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.
Public test cases
Input
9
23
1
10000
Output
9 is not prime
23 is prime
1 is not prime
10000 is not prime
Input
9
23
1
10000
Output
9 is not prime
23 is prime
1 is not prime
10000 is not prime