#C13539. Sum of Two Primes

    ID: 43088 Type: Default 1000ms 256MiB

Sum of Two Primes

Sum of Two Primes

Given an integer n, determine whether it can be expressed as the sum of two prime numbers. A prime number is a natural number greater than 1 that has no divisors other than 1 and itself. Specifically, you are to check if there exists two primes p and q such that
\( n = p + q \).

For example:

  • For n = 10, since 10 = 3 + 7 (both prime), the answer is True.
  • For n = 11, no such pair of prime numbers exists, so the answer is False.
  • For n = 4, the only possibility is 2 + 2, so the answer is True.

Your task is to implement an efficient algorithm for prime checking so that your solution works well even for large values of n.

inputFormat

The input consists of a single integer n provided via standard input (stdin).

outputFormat

Output a single word: True if n can be represented as the sum of two prime numbers, otherwise output False. The output should be printed to standard output (stdout).

## sample
10
True