You are given three positive (i.e. strictly greater than zero) integers $x$, $y$ and $z$.

Your task is to find positive integers $a$, $b$ and $c$ such that $x = \max(a, b)$, $y = \max(a, c)$ and $z = \max(b, c)$, or determine that it is impossible to find such $a$, $b$ and $c$.

You have to answer $t$ independent test cases. Print required $a$, $b$ and $c$ in any (arbitrary) order.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 2 \cdot 10^4$) — the number of test cases. Then $t$ test cases follow.

The only line of the test case contains three integers $x$, $y$, and $z$ ($1 \le x, y, z \le 10^9$).


-----Output-----

For each test case, print the answer:  "NO" in the only line of the output if a solution doesn't exist;  or "YES" in the first line and any valid triple of positive integers $a$, $b$ and $c$ ($1 \le a, b, c \le 10^9$) in the second line. You can print $a$, $b$ and $c$ in any order. 


-----Example-----
Input
5
3 2 3
100 100 100
50 49 49
10 30 20
1 1000000000 1000000000

Output
YES
3 2 1
YES
100 100 100
NO
NO
YES
1 1 1000000000

Difficulty: introductory

Starter code:

Solutions:
for testcase in range(int(input())):
    vals = list(map(int, input().split()))
    
    ans = None
    for a in vals:
        for b in vals:
            for c in vals:
                if max(a, b) == vals[0] and max(a, c) == vals[1] and max(b, c) == vals[2]:
                    ans = [a, b, c]
    
    if ans is None:
        print("NO")
    else:
        print("YES")
        print(*ans)
                    


def check(a, b, c, x, y, z):
    ok = True
    ok &= x == max(a, b)
    ok &= y == max(a, c)
    ok &= z == max(b, c)
    return ok

def solve():
    x,y,z = map(int,input().split())
    l = [x, y, z, 1, 10 ** 9]
    for a in l:
        for b in l:
            for c in l:
                if check(a, b, c, x, y, z):
                    print('YES')
                    print(a, b, c)
                    return
    print('NO')

t = int(input())
for _ in range(t):
    solve()

def solve():
    x, y, z = map(int, input().split())
    for s in range(1 << 3):
        a = x if s & 1 else y
        b = x if s & 2 else z
        c = y if s & 4 else z
        if x == max(a, b) and y == max(a, c) and z == max(b, c):
            print('YES')
            print(a, b, c)
            return
    print('NO')

t = int(input())
for _ in range(t):
    solve()

for _ in range(int(input())):
    a = sorted(list(map(int, input().split())))
    if (a[1] != a[2]):
        print("NO")
    else:
        print("YES")
        print(a[0], a[0], a[2])



t=int(input())
for _ in range(t):
  a=list(map(int,input().split()))
  a.sort()
  if a[1]==a[2]:
    print('YES')
    ans=[]
    ans.append(str(a[1]))
    ans.append(str(a[0]))
    ans.append(str(a[0]))
    print(' '.join(ans))
  else:
    print('NO')


t=int(input())
def fun(x,y,z):
    a=-1
    b=-1
    c=-1
    flag=0
    l=[x,y,z]
    for i in l:
        for j in l:
            for k in l:
                if x==max(i,j) and y==max(i,k) and z==max(j,k):
                    flag=1
                    a=i
                    b=j
                    c=k
                    break
            if flag:
                break
        if flag:
            break
    if flag:
        print("YES")
        print(a,b,c)
    else:
        print("NO")
while t:
    t-=1
    x,y,z=list(map(int,input().split()))
    fun(x,y,z)



tt = int(input())

for loop in range(tt):

    x,y,z = list(map(int,input().split()))

    if x == y == z:
        print ("YES")
        print(x,y,z)
    elif x == y and x > z:
        print ("YES")
        print(x,z,z)
    elif x == z and x > y:
        print ("YES")
        print(y,x,y)
    elif y == z and y > x:
        print ("YES")
        print(x,x,y)
    else:
        print ("NO")
        


"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var): sys.stdout.write(str(var)+"\n")
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return list(map(int, data().split()))
def ssp(): return list(map(str, data().split()))
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


for _ in range(int(data())):
    a = l()
    a.sort()
    if a[0] == a[1] == a[2]:
        out("YES")
        outa(*a)
        continue
    if a[1] == a[2]:
        out("YES")
        outa(a[2], a[0], a[0])
        continue
    out("NO")


import sys
#q=1
q=int(input())
for i in range(q):
    #n,m=[int(j) for j in sys.stdin.readline().split()]
    #n=int(sys.stdin.readline())
    a=[int(j) for j in sys.stdin.readline().split()]
    a.sort()
    if a[1]==a[2]:
        print('YES')
        print(a[0],a[0],a[2])
    else:
        print('NO')

import math as mt 
import sys,string
input=sys.stdin.readline
L=lambda : list(map(int,input().split()))
Ls=lambda : list(input().split())
M=lambda : list(map(int,input().split()))
I=lambda :int(input())
from collections import defaultdict



t=I()
for i in range(t):
    x,y,z=M()
    d=[x,y,z]
    p=max(x,y,z)
    c=0
    for j in d:
        if(j==p):
            c+=1
    if(c>=2):
        print("YES")
        if(c==2):
            print(min(x,y,z),min(x,y,z),p)
        else:
            print(p,p,p)
    else:
        print("NO")


for u in range(int(input())):
    x, y, z = map(int, input().split())
    
    t = max(x, y, z)
    ans = 0
    if t == x:
        ans += 1
    if t ==y:
        ans += 1
    if t == z:
        ans += 1
    
    if ans >=2:
        print("YES")
        print(min(x,y,z), min(x, y, z), t)
    else:
        print('NO')

def solve(x, y, z):
    x, y, z = sorted([x, y, z])
    if x == y == z:
        return [x, x, x]
    elif x < y and y == z:
        return [x, x, z]
    return None

t = int(input())
for _ in range(t):
    # n = int(input())
    x, y, z = map(int, input().split())
    # c = list(map(int, input().split()))
    sol = solve(x, y, z)
    if sol:
        print('YES')
        print(' '.join(map(str, sol)))
    else:
        print('NO')

import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return list(map(int, minp().split()))

def solve():
	a = list(mints())
	a.sort()
	if a[-1] != a[-2]:
		print("NO")
		return
	else:
		print("YES")
		print(a[0],a[0],a[1])

for i in range(mint()):
	solve()


T, = list(map(int, input().split()))
for _ in range(T):
    x, y, z = list(map(int, input().split()))
    if x == z and z>=y:
        print("YES")
        print(y, x, y)
    elif y == z and z>=x:
        print("YES")
        print(x, x, z)
    elif x == y and x>=z:
        print("YES")
        print(x, z, z)
    else:
        print("NO")




for _ in range(int(input())):
    l = list(map(int,input().split()))
    l.sort()
    if l[1]==l[2]:
        print("YES")
        print(l[0],l[0],l[2])
    else:
        print("NO")

for _ in range(int(input())):
    x,y,z=map(int,input().split())
    a,b,c=min(x,y),min(x,z),min(y,z)
    if x==max(a,b) and y==max(a,c) and z==max(b,c):print('YES');print(a,b,c)
    else:print('NO')

import sys
input = sys.stdin.readline
for f in range(int(input())):
    x,y,z=map(int,input().split())
    a=min(x,y)
    b=min(x,z)
    c=min(y,z)
    if max(a,b)!=x or max(a,c)!=y or max(b,c)!=z:
        print("NO")
    else:
        print("YES")
        print(a,b,c)

from itertools import *
for i in range(int(input())):
        x, y, z = list(map(int ,input().split()))
        a = [x, y, z, min(x, y, z), max(x, y, z)]
        ha = False
        for p in permutations(a):
                if max(p[0], p[1]) == x and max(p[0], p[2]) == y and max(p[1], p[2]) == z:
                        print("YES")
                        print(*p[:3])
                        ha = True
                        break
        if not ha:
                print("NO")