Primality

Write a program that reads a sequence of natural numbers and, for each one, tells if it is a prime number or not. Remember that a natural number is prime if and only if it is greater than 1 and it does not have any positive divisor other than 1 and itself.

Input

Input consists of a number nn, followed by nn natural numbers.

Output

For every given natural number, tell in a line if it is prime or not, following the format of the example.

Hint

For every given nn, at most about n\sqrt{n}\, steps are needed to know if it is prime or not.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:27:32.182Z

© Jutge.org, 2006–2026.
https://jutge.org