5018 - Prime Number Testing   

Description

There are many useful application of prime numbers. Determine whether a number is a prime number is an important job! Please write a program to check a positive interger N is a prime number or not.

Input

The input file contains several cases. Each case will be on a line by itself and will consist of a number N (2 <= N <= 2^31-1). The input ends with a 0 on a single line. Please do not do any output for this number.

Output

Please print "YES" (without quote) if N is a pirme number, otherwise print "NO" (without quote).

Sample Input  Download

Sample Output  Download

Tags




Discuss