Emu’s Favorite

Author: QuwsarOhi

Problem Setter: Nazmul Hoda

Intake 33, Department of CSE

You are given an integer input N and you have to find whether it is Emu’s favorite or not. If it is Emu’s favorite then print “YES” else print “NO”.

 

A number is Emu’s favorite if the summation of one or more 7 or -7 equal to N.

Example: n = 14 so, 14 = 7+7

                n = 21 so, 21 = 7+7+7

So the numbers are Emu’s favorite.

Input Format

The first line of input contains an integer T (1<=T<=100) denoting the number of test cases. The next T lines of input contain an integer N (-109<=N<=109)to be tested. 

Output Format

For each test case, the output is in a new line containing the answer 'YES' or 'NO' depending on whether the given number N is  Emu's favorite or not.

Samples

Input
2 567 389
Output
YES NO
Limits
Language Time Memory
GNU C 11 1s 512MB
GNU C++ 14 1s 512MB
GNU C++ 11 1s 512MB
PHP 7 1s 1024MB
Java (OpenJDK 8) 1s 4096MB
Statistics
Login To Submit