CPC 1 Problem 4 - Chika's Prime Numbers

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Chika likes numbers which can be written as the sum of two primes! Given T numbers, determine which ones can be written as the sum of two primes.

Constraints

1 \le T \le 10^6

1 \le N \le 10^7

Input Specification

The first line contains a single positive integer T.

Each of the next T lines contains a single positive integer, N.

Output Specification

Output T lines. On the ith line, output YES if the ith integer can be expressed as the sum of two primes. Otherwise, output NO.

Sample Input

1
4

Sample Output

YES

Comments

There are no comments at the moment.