Submit solution
Points:
3
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
C++, Java, Python
A number is prime if the only numbers by which it can be evenly divided are itself and 1. Given a number, determine if it is prime.
Input
The input will be a positive integer no greater then 1 million.
Output
If the number is prime, print YES
, otherwise print NO
.
Sample Input
2
Sample Output
YES
Comments