题目描述
Problem Description
Score: $ 400 $ points
penguinman has a non-empty multiset consisting of non-negative integers. According to his calculations, the elements of the set have:
- bitwise OR equal to $ A $
- bitwise AND equal to $ B $
- bitwise XOR equal to $ C $
He is not confident in his calculations and wants you to verify if they are correct.
You are given $ T $ test cases. For each of them, determine if there exists a multiset of non-negative integers that does not contradict penguinman's statements.
Refer to this for the definition of bitwise OR, this for the definition of bitwise AND, and this for the definition of bitwise XOR.
Input Format
The input is given from the standard input in the following format. Let $ A_i, B_i, C_i $ be $ A, B, C $ for the $ i $-th test case, respectively.
\(T\)
\(A_1\) \(B_1\) \(C_1\)
\(A_2\) \(B_2\) \(C_2\)
\(⋮\)
\(A_T\) \(B_T\) \(C_T\)
Output Format
On the $ i $-th line, output the answer for the $ i $-th test case.
If there exists a multiset that does not contradict penguinman's statements, output Yes; otherwise, output No. End with a newline.
Sample Input and Output
Sample Input #1
4
3 1 2
4 2 4
3 3 0
5 2 1
Sample Output #1
Yes
No
Yes
No
Sample Input #2
10
4294950654 128 1515558086
3651343388 2076315599 1067568134
1006034671 154158080 851876591
4226809790 10486016 870489910
4005491433 1115853312 2889638121
4276043775 68162562 3026001755
2934431727 2822915648 111516079
155997896 3325455178 1339093083
1410500136 1501974124 3058302659
4226801641 2709524480 2846154689
Sample Output #2
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Notes/Hints
None
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分