Hide

Problem G
Prime Number

A prime number is a whole number greater than $1$ whose only factors are $1$ and itself.

Advanced hint: To speed up your program you can make use of the fact that divisors come in pairs. That is if an integer $i$ divides an integer $n$, then $\frac{n}{i}$ also divides $n$. Also note that as $i$ becomes larger, $\frac{n}{i}$ becomes smaller.

Input

Input consists of one line containing one integer $n$, where $1 \leq n \leq 10^6$.

Output

Output prime if $n$ is prime, otherwise output not prime.

Sample Input 1 Sample Output 1
1
not prime
Sample Input 2 Sample Output 2
2
prime
Sample Input 3 Sample Output 3
6
not prime
Sample Input 4 Sample Output 4
7
prime
Sample Input 5 Sample Output 5
13
prime
Sample Input 6 Sample Output 6
23
prime
Sample Input 7 Sample Output 7
25
not prime

Please log in to submit a solution to this problem

Log in