Multiplication and Division by 2
시간 제한2초메모리 제한512 MB
2^32을 법으로 하는 2의 곱셈과 내림 나눗셈을 반복해 x를 y로 만들 수 있는지 판정한다.
문제
Consider the number stored in uint32 data type. We can multiply or divide it by any number of times in any order. Can we obtain the number after some sequence of operations?
When is stored in an uint32, and we multiply it by , it transforms into . For example, , and .
When is stored in an uint32, and we divide it by , it transforms into . For example, , and .
입력
The first line contains an integer , the number of test cases (). The next lines describe test cases, one per line. Each test case is given by two integers and ().
출력
For each test case, print a single word on a separate line: "Yes" if we can turn into using the allowed operations, or "No" otherwise.
힌트
In the first test case, we can multiply by , and then divide the result by to get .
In the second test case, there is no way to turn into .