#420. Problem H. Three Integers
Problem H. Three Integers
Problem H. Three Integers
You are given three non-negative integers , , and . Find three positive integers , , and that satisfy
$$\begin{array}{c} x \text{ mod } y = a \\ y \text{ mod } z = b \\ z \text{ mod } x = c \\ \end{array} $$Input
The first line contains an integer --the number of test cases.
Each test case contains integers on a single line.
Output
For each test case, if there are such three integers satisfying the condition, output "YES", then output the three integers on the following line, or "NO" otherwise.
Example
4
0 0 0
1 2 3
6 6 6
11 3 3
YES
1 1 1
YES
5 2 8
NO
YES
11 45 14
Hint
The question comes from 2021 GuangZhou but this question is used as an exercise.