You are given three non-negative integers $x$, $y$ and $z$. Determine whether there exist three non-negative integers $a$, $b$ and $c$ satisfying the following three conditions:
$a \mathbin{\&} b = x$$b \mathbin{\&} c = y$$a \mathbin{\&} c = z$
where $\mathbin{\&}$ denotes the bitwise AND operation.
Input
Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.
The first and only line of each test case contains three integers $x$, $y$ and $z$ ($0\le x, y, z\le 10^9$) — the target values of $a \mathbin{\&} b$, $b \mathbin{\&} c$ and $a \mathbin{\&} c$, respectively.
Output
For each test case, output "YES" if there exists three non-negative integers $a$, $b$, and $c$ satisfying the above conditions, and "NO" otherwise.
You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
Note
In the first test case, $a = 3$, $b = 5$, and $c = 9$ satisfies the condition as $3 \mathbin{\&} 5 = 1$, $5 \mathbin{\&} 9 = 1$, and $3 \mathbin{\&} 9 = 1$.
In the second test case, $a = 7$, $b = 3$, and $c = 22$ satisfies the condition as $7 \mathbin{\&} 3 = 3$, $3 \mathbin{\&} 22 = 2$, and $7 \mathbin{\&} 22 = 6$.
In the third test case, it can be proven that there are no three non-negative integers $a$, $b$, and $c$ such that $a \mathbin{\&} b = 4$, $b \mathbin{\&} c = 8$, and $a \mathbin{\&} c = 12$.
样例
5
1 1 1
3 2 6
4 8 12
9 10 12
12730 3088 28130
YES
YES
NO
YES
NO
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。