5534: 【GESP202409 二级】数位之和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

小杨有 $n$ 个正整数,他认为一个正整数是美丽数字当且仅当该正整数每一位数字的总和是 $7$ 的倍数。

小杨想请你编写一个程序判断 $n$ 个正整数哪些是美丽数字。

Input

第一行包含一个正整数 $n$,表示正整数个数。  
之后 $n$ 行,每行一个包含一个正整数 $a_i$。

Output

对于每个正整数输出一行一个字符串,如果是美丽数字则输出 `Yes`,否则输出 `No`。

Sample Input Copy

3
7
52
103

Sample Output Copy

Yes
Yes
No

HINT

对全部的测试数据,保证 $1 \leq n \leq 10^5$,$1 \leq a_i \leq 10^5$。