时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld
题目描述
Initially, you have a set
)
. Then you have two operations:

1. Choose two elements
)
from
set

, insert

to the set.

2. Choose two elements
)
from
set

, insert
)
to the set.
We define

as the absolute value of

.
We define
)
as the greatest common divisor of

and

.
Specially,
%20%20%3D%20%20%5Cgcd(0%2C%5C%20a)%20%3D%20%20a)
.
You task is making

after several operations.
If possible, print "YES". Otherwise, print "NO".
输入描述:
Each test contains multiple test cases. The first line contains the number of test cases
(
).
The description of the test cases follows.
One line contains three integers
(
).
输出描述:
For each test case, output "YES" or "NO".