Chef has the
numbers . He wants to give exactly of these numbers to his friend and keep the rest with him.
He can choose any numbers such that the GCD of any number from Chef's set and any number from his friend's set is equal to .
Formally, suppose Chef gives the set of numbers to his friend and keeps with himself (where and ). Then and must satisfy
Chef needs your help in choosing these numbers. Please find any valid set of numbers that will satisfy the condition, or tell him that no such set exists.
Input Format
- The first line of input contains a single integer denoting the number of test cases. The description of test cases follows.
- The first and only line of each test case contains two space-separated integers and .
Output Format
For each test case first output a single line containing "YES" (without quotes) if a set of size satisfying Chef's condition exists; and "NO" if no such set exists. This line is not case-sensitive so "YeS", "nO", etc. are also acceptable.
Next, if the answer is "YES", print another line containing distinct space-separated integers from to denoting the numbers which Chef will give to his friend. The integers can be printed in any order.
If there are multiple solutions, you may print any of them.
Constraints
- Sum of over all test cases does not exceed
Sample Input 1
3
4 1
4 2
6 3
Sample Output 1
Yes
3
Yes
4 2
No
Explanation
Test case : Chef can give to his friend and keep for himself. is coprime with and so the condition is satisfied. Another possible solution is Chef giving to his friend.
Test case : Chef can give and keep (or vice versa). It can be seen that , , , and so the condition is satisfied.
Test case : There is no set of 3 numbers that can satisfy the given condition.
ConversionConversion EmoticonEmoticon