Solve the programming task below in a Python markdown code block.
You are given an integer N. Find if it is possible to represent N as the sum of several(possibly zero) 2's and several(possibly zero) 7's. 

Formally, find if there exist two integers X, Y \ (X, Y ≥ 0) such that 2 \cdot X + 7\cdot Y = N.

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of a single line containing an integer N.
  
------ Output Format ------ 

For each test case, print on a new line YES if it is possible to represent N as the sum of several(possibly zero) 2's and several(possibly zero) 7's and NO otherwise.

You may print each character of the string in either uppercase or lowercase (for example, the strings yEs, yes, Yes, and YES will all be treated as identical).

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ N ≤ 10^{8}$

----- Sample Input 1 ------ 
4
2
5
7
11

----- Sample Output 1 ------ 
YES
NO
YES
YES

----- explanation 1 ------ 
Test case $1$: $2 \cdot 1 + 7\cdot 0 = 2$.

Test case $2$: It is impossible to express $5$ as a sum of several $2$'s and $7$'s.

Test case $3$: $2 \cdot 0 + 7\cdot 1 = 7$.

Test case $4$: $2 \cdot 2 + 7\cdot 1 = 11$.