#P1521A. Nastia and Nearly Good Numbers
Nastia and Nearly Good Numbers
No submission language available for this problem.
Description
Nastia has positive integers and . She defines that:
- The integer is good if it is divisible by ;
- Otherwise, the integer is nearly good, if it is divisible by .
For example, if and , the integers and are good, the integers , and are nearly good, the integers , are neither good nor nearly good.
Find different positive integers , , and such that exactly one of them is good and the other are nearly good, and .
The first line contains a single integer () — the number of test cases.
The first line of each test case contains two integers and (, ) — numbers that Nastia has.
For each test case print:
- "YES" and different positive integers , , and () such that exactly one of them is good and the other are nearly good, and .
- "NO" if no answer exists.
If there are multiple answers, print any.
Input
The first line contains a single integer () — the number of test cases.
The first line of each test case contains two integers and (, ) — numbers that Nastia has.
Output
For each test case print:
- "YES" and different positive integers , , and () such that exactly one of them is good and the other are nearly good, and .
- "NO" if no answer exists.
If there are multiple answers, print any.
Samples
Note
In the first test case: — good number; and — nearly good numbers.
In the second test case: — good number; and — nearly good numbers.
In the third test case: — good number; and — nearly good numbers.