409016: GYM103415 H Three Integers
Memory Limit:512 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
H. Three Integerstime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output
You are given three non-negative integers $$$a$$$, $$$b$$$, and $$$c$$$. Find three positive integers $$$x$$$, $$$y$$$, and $$$z$$$ that satisfy $$$x\bmod y=a$$$, $$$y\bmod z=b$$$, and $$$z\bmod x=c$$$.
InputThe first line contains an integer $$$t$$$ ($$$1\le t\le 10^5$$$) — the number of test cases.
Each test case contains $$$3$$$ integers $$$a$$$, $$$b$$$, $$$c$$$ ($$$0\le a,b,c\le 10^9$$$) on a single line.
OutputFor each test case, if there are such three integers satisfying the condition, output "YES", then output the three integers $$$x$$$, $$$y$$$, $$$z$$$ ($$$1\le x,y,z\le 10^{18}$$$) on the following line, or "NO" otherwise.
ExampleInput4 0 0 0 1 2 3 6 6 6 11 3 3Output
YES 1 1 1 YES 5 2 8 NO YES 11 45 14