#C10232. Prime Number Checker

    ID: 39415 Type: Default 1000ms 256MiB

Prime Number Checker

Prime Number Checker

In this problem, you are given a single integer (N). Your task is to determine whether (N) is a prime number or not. A prime number is defined as a number greater than 1 that has no positive divisors other than 1 and itself. The efficiency of your solution is important since the checking process runs in (O(\sqrt{N})) time by iterating through potential factors up to (\sqrt{N}).

For example, if (N = 7), the output should be "Yes", since 7 is a prime number. Conversely, if (N = 100), the output should be "No".

inputFormat

The input consists of a single line containing an integer (N) ((0 \leq N \leq 10^9)). The value should be read from standard input (stdin).

outputFormat

Output a single line containing either "Yes" if (N) is a prime number, or "No" otherwise. The output should be written to standard output (stdout).## sample

7
Yes