407921: GYM102942 D XOR Game

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. XOR Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Alice and Bob are playing a game.

First Alice will choose two integers $$$a$$$ and $$$b$$$ $$$(a \leq b)$$$. Then Bob will take two integers $$$c$$$ and $$$d$$$ $$$(1 \leq c \leq a , 1 \leq d \leq b)$$$.

Score of Alice will be ($$$a \oplus b$$$) and score of Bob will be ($$$c \oplus d$$$), where $$$\oplus$$$ denotes the bitwise xor operation.

If the score of Bob is strictly greater than the score of Alice then Bob wins, otherwise Alice wins.

You know the two integers $$$a$$$ and $$$b$$$ that Alice chose. Determine if it is possible to choose some $$$c$$$ and $$$d$$$ for Bob to win.

Input

The first line contains an integer $$$t$$$ $$$(1 \leq t \leq 10^{2})$$$ — the number of test cases in the input.

Then $$$t$$$ test cases follow.

Each test case is a line containing two integers $$$a$$$ and $$$b$$$ $$$(2 \leq a,b \leq 10^{6}, a \leq b)$$$.

Output

For each test case, If Bob has a winning strategy print Yes, otherwise No.

You can print each character in any case.

ExampleInput
3
2 2
2 4
6 10
Output
Yes
No
Yes
Note

In the first test, the score of Alice is $$$0$$$. Bob can choose $$$c=1$$$ and $$$d=2$$$ to get a score of $$$3$$$ to win.

In the second test, we can show that whatever Bob chooses, he will always lose.

加入题单

上一题 下一题 算法标签: