#P10835. 『FLA - I』冲云霄
『FLA - I』冲云霄
Description
Given integers and , determine whether there is a sequence that satisfying the following constraints. The indices of the sequence elements in this question start from .
-
The length of the sequence is , and each entry of the sequence is a positive integer.
-
, that is, the result of XORing all entries of the sequence is equal to .
-
All the entries in are the same.
Input Format
Each test consists of multiple test cases.
The first line contains an integer — the number of test cases. Then follows the description of the test cases.
Each test case consists of one line. The only line of each test case contains two integers and .
Output Format
For each test case, if there is a sequence that satisfies the restrictions, print Yes; otherwise, print No.
4
3 3
2 5
0 3
1 4
Yes
Yes
No
No
Hint
「Sample Explanation #1」
For the first test case, the sequence can be , in which case $a_1 \oplus a_2 \oplus a_3 = 3 \oplus 3 \oplus 3 = 3$.
For the second test case, the sequence can be , in which case $a_1 \oplus a_2 \oplus a_3 \oplus a_4 \oplus a_5 = 2 \oplus 2 \oplus 2 \oplus 2 \oplus 2 = 2$.
For the third and fourth test cases, it can be proved that there is no sequence that satisfies the restrictions.
「Constraints」
| Test Id | |||
|---|---|---|---|
Each test is worth points.
For all tests, , , .
京公网安备 11011102002149号