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$.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	n = int(input())
	if n < 7 and n % 2 != 0:
		print('NO')
	else:
		print('YES')


def check_possible(N):
	for Y in range(N // 7 + 1):
		X = (N - 7 * Y) // 2
		if 2 * X + 7 * Y == N:
			return 'YES'
	return 'NO'
T = int(input())
for i in range(T):
	N = int(input())
	result = check_possible(N)
	print(result)


n = int(input())
for i in range(0, n):
	a = int(input())
	c = 0
	if a == 1 or a == 3 or a == 5:
		print('NO')
	else:
		print('YES')


T = int(input())
for i in range(T):
	N = int(input())
	if N == 1 or N == 3 or N == 5:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	if n % 2 == 0 or n > 6:
		print('YES')
	else:
		print('NO')


def code():
	cases = int(input())
	for _ in range(cases):
		N = int(input())
		if N % 7 % 2 != 0 and N < 7:
			print('NO')
		else:
			print('YES')
code()


T = int(input())
for _ in range(T):
	N = int(input())
	print('NO') if N % 7 % 2 != 0 and N < 7 else print('YES')


for case in range(int(input())):
	x = int(input())
	count2 = count7 = 0
	if x in [1, 3, 5]:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	if n % 7 % 2 != 0 and n < 7:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	a = int(input())
	if a % 7 % 2 != 0 and a < 7:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	N = int(input())
	if N % 7 % 2 == 0 or N > 7:
		print('YES')
	else:
		print('NO')


try:
	t = int(input())
	for r in range(t):
		n = int(input())
		if n == 1 or n == 3 or n == 5:
			print('NO')
		else:
			print('YES')
except:
	pass


t = int(input())
for i in range(t):
	n = int(input())
	if n == 1 or n == 3 or n == 5:
		print('NO')
	else:
		print('YES')