8513: link with Equilateral Triangle

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

link has a big equilateral triangle with side length n. The big triangle consists of n^2 small equilateral triangles with side length 11.

link is going to fill numbers into each vertex of the small triangle with the following limits:

· The number filled in should be 01, or 2. · The left side of the big triangle should not be filled with 0. The right side of the big triangle should not be filled with 1. The bottom side of the big triangle should not be filled with 2. · For each small triangle with side length 1, the sum of three vertices should not be a multiple of 3.



link went crazy when he tried to do so because he couldn't find any triangle satisfying all conditions above. Now, he turns to you for help.

Please tell link: Is it possible to fill the triangle so that it satisfies all conditions above?


输入格式



Each test contains multiple test cases. The first line contains the number of test cases T (1T1000). Description of the test cases follows.

For each test case, there is only one line containing a single integer 1n103).




输出格式

For each test case, output Yes if it is possible to do so. Output No if it is impossible to do so.

输入样例 复制

2
1
2

输出样例 复制

No
No