# author: ankan2526
import math, bisect, heapq, random, sys, itertools
input=sys.stdin.readline
ints = lambda : list(map(int,input().split()))
p=10**9+7
alpha = "abcdefghijklmnopqrstuvwxyz"
for t in range(int(input())):
a,b,c=ints()
x,y,z = sorted([a,b,c])
temp=x+y
#print(temp,temp-z)
if (temp-z)%2==0 and (temp-z)//2>0:
print("YES")
x1,y1=1,1
x2,y2=x+1,1
x3=(temp-z)//2+1
y3=y-(temp-z)//2+1
points=[[x1,y1],[x2,y2],[x3,y3]]
per = list(itertools.permutations(points))
for l in per:
d1=abs(l[0][0]-l[1][0])+abs(l[0][1]-l[1][1])
d2=abs(l[2][0]-l[1][0])+abs(l[2][1]-l[1][1])
d3=abs(l[0][0]-l[2][0])+abs(l[0][1]-l[2][1])
if d1==a and d2==b and d3==c:
for j in l:
print(*j)
break
else:
print("NO")