#P8845. [传智杯 #4 初赛] 小卡和质数
[传智杯 #4 初赛] 小卡和质数
Background
Xiaoka has recently become obsessed with prime numbers, so he came up with a problem related to primes to test you.
A prime number is a natural number greater than that has no divisors other than and itself.
Problem Description
Xiaoka has queries. In each query, you are given two positive integers .
Xiaoka wants to know whether the -th prime number and the -th prime number satisfy , that is, whether the XOR value of the -th prime and the -th prime is .
Input Format
The first line contains a positive integer , representing the number of queries.
The next lines each contain two positive integers , representing a query about the -th prime number and the -th prime number.
Output Format
Output lines. Each line contains a string Yes or No, indicating whether the XOR value of the two prime numbers is or not , respectively.
4
1 2
23 145
66 2
1 14
Yes
No
No
No
Hint
Translated by ChatGPT 5