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

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
def threePairMax(arr):
	arr.sort()
	if arr[-1] == arr[-2]:
		print('YES')
		print(*[arr[0], arr[0], arr[-1]])
	else:
		print('NO')
tc = int(input())
for i in range(tc):
	inp = list(map(int, input().split()))
	threePairMax(inp)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	arr = sorted([x, y, z])
	if arr[2] == x and arr[2] == y or (arr[2] == z and arr[2] == y) or (arr[2] == x and arr[2] == z):
		a = arr[2]
		b = arr[0]
		c = arr[0] - 1
		if c <= 0:
			print('YES')
			print(a, b, b)
		else:
			print('YES')
			print(a, b, c)
	else:
		print('NO')


for i in range(int(input())):
	(x, y, z) = sorted(map(int, input().split()))
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x < y and y == z:
		print('YES')
		print(1, x, y)
	else:
		print('NO')


for i in range(int(input())):
	k = list(map(int, input().split()))
	if len(set(k)) == 2:
		if k[1] == k[2]:
			if k[0] < k[1]:
				print('YES')
				print(k[0], k[0], k[1])
			else:
				print('NO')
		if k[0] == k[1]:
			if k[2] < k[1]:
				print('YES')
				print(k[1], k[2], k[2])
			else:
				print('NO')
		if k[0] == k[2]:
			if k[1] < k[0]:
				print('YES')
				print(k[1], k[0], k[1])
			else:
				print('NO')
	elif len(set(k)) == 1:
		print('YES')
		print(k[0], k[0], k[0])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = sorted(map(int, input().split()))
	if y != z:
		print('NO')
	else:
		print('YES')
		print(x, x, z)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if len(set(l)) == 1:
		print('YES\n', *l)
	elif l.count(max(l)) == 2:
		print('YES\n', max(l), min(l), 1)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = [int(i) for i in input().split()]
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if x >= z:
			print('YES')
			print(x, z, z)
		else:
			print('NO')
	elif y == z:
		if y >= x:
			print('YES')
			print(y, x, x)
		else:
			print('NO')
	elif x == z:
		if x >= y:
			print('YES')
			print(x, y, y)
		else:
			print('NO')


from sys import stdout, stdin, setrecursionlimit
from io import BytesIO, IOBase
from collections import *
from itertools import *
from random import *
from bisect import *
from string import *
from queue import *
from heapq import *
from math import *
from re import *
from os import *

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))

def fast():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in fast().split()]
(z, zz) = (fast, lambda : list(map(int, z().split())))
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def output(answer, end='\n'):
	stdout.write(str(answer) + end)
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
num = int(z())
for _ in range(num):
	(a, b, c) = szzz()
	if b == c:
		print('YES')
		print(a, a, b)
	else:
		print('NO')


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
test_count = inp()
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	(x, y, z) = invr()
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y and z < x:
		print('YES')
		print(x, z, z)
	elif y == z and x < y:
		print('YES')
		print(x, x, y)
	elif x == z and y < x:
		print('YES')
		print(y, x, y)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	(a, b, c) = (0, 0, 0)
	if x == z and x >= y:
		print('Yes')
		(b, a, c) = (x, y, y)
	elif x == y and x >= z:
		print('Yes')
		(a, b, c) = (x, z, z)
	elif y == z and y >= x:
		print('Yes')
		(c, a, b) = (y, x, x)
	else:
		print('No')
	if a != 0 or b != 0 or c != 0:
		print(a, b, c, end=' ')
		print()


for i in range(int(input())):
	m = list(map(int, input().split()))
	if m.count(max(m)) > 1:
		print('YES')
		print(max(m), min(m), 1)
	else:
		print('NO')


import atexit
import io
import sys
from itertools import permutations
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
for case in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	found = False
	for perm in permutations([x, y, z, 1], 3):
		(a, b, c) = perm
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
			found = True
			break
	if not found:
		print('NO')


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


t = int(input())
while t != 0:
	(x, y, z) = input().split(' ')
	x = int(x)
	y = int(y)
	z = int(z)
	mx = max(x, y, z)
	mn = min(x, y, z)
	mc = 0
	if mx == x:
		mc = mc + 1
	if mx == y:
		mc = mc + 1
	if mx == z:
		mc = mc + 1
	if mc < 2:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)
	t = t - 1


for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	flag = False
	if x != y and max(x, y) == z:
		flag = True
	elif y != z and max(y, z) == x:
		flag = True
	elif x != z and max(x, z) == y:
		flag = True
	elif x == y and y == z:
		flag = True
	else:
		print('NO')
		continue
	print('YES')
	print(max(x, y, z), min(x, y, z), min(x, y, z))


for _ in range(int(input().strip())):
	(x, y, z) = list(map(int, input().strip().split(' ')))
	(la, lb, lc) = ([x, y], [x, z], [y, z])
	(a, b, c) = (x, y, z)
	Flag = False
	for i in la:
		for j in lb:
			for k in lc:
				if x == max(i, j) and y == max(i, k) and (z == max(j, k)):
					Flag = True
					(a, b, c) = (i, j, k)
	if Flag:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = list(map(int, input().split()))
	if x == y == z:
		array = ' '.join((str(e) for e in [x, y, z]))
		print('YES')
		print(array)
	elif x == y or y == z or x == z:
		res_max = [max(x, y, z)]
		res_min = [min(x, y, z)]
		array_res = sorted(res_max + res_min * 2)
		if array_res == sorted([x, y, z]):
			print('NO')
		else:
			array = ' '.join((str(e) for e in array_res))
			print('YES')
			print(array)
	else:
		print('NO')


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


for _ in range(int(input())):
	l = list(map(int, input().split()))
	s = set(l)
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(*l)
	else:
		x = l[0]
		y = l[1]
		z = l[2]
		ans = 0
		if x < y and y == z:
			ans = 1
			print('YES')
			print(1, x, z)
		elif x == z and y < x:
			ans = 1
			print('YES')
			print(1, x, y)
		elif x == y and z < x:
			ans = 1
			print('YES')
			print(x, 1, z)
		else:
			print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and x == z:
		print('YES')
		print('{} {} {}'.format(x, y, z))
	else:
		l = [x, y, z]
		l.sort()
		if l[0] == l[1]:
			print('NO')
		else:
			print('YES')
			print('1 {} {}'.format(l[0], l[1]))


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


for _ in range(int(input())):
	li = list(map(int, input().split()))
	if li[0] == li[1] and li[0] == li[2]:
		print('YES')
		print(*li)
	elif li.count(max(li)) == 2:
		print('YES')
		y = list(set(li))
		print(1, *y)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(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')


for i in range(int(input())):
	a = list(map(int, input().split()))
	max_ = max(a)
	min_ = min(a)
	if max_ == min_:
		print('YES')
		print(*a, sep=' ')
	else:
		len_ = len(a)
		set_ = len(set(a))
		if len_ == set_:
			print('NO')
		else:
			sum_ = sum(a)
			equivalence = 2 * max_ + min_
			if sum_ == equivalence:
				print('YES')
				list_ = [max_, min_, min_]
				print(*list_, sep=' ')
			else:
				print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a != b and b != c and (a != c):
		print('NO')
	else:
		x = y = z = 1
		if a == b and b == c and (c == a):
			x = y = z = a
		elif a == b:
			x = a
			z = c
		elif b == c:
			x = b
			z = a
		else:
			x = c
			z = b
		if x >= z:
			print('YES')
			print(x, y, z)
		else:
			print('NO')


def main():
	casos = int(input())
	for i in range(casos):
		numeros = list(map(int, input().split()))
		numeros.sort(reverse=True)
		if numeros[0] != numeros[1]:
			print('NO')
		else:
			print('YES')
			if numeros[2] != 1:
				print(str(numeros[0]) + ' ' + str(numeros[2]) + ' ' + str(numeros[2] - 1))
			else:
				print(str(numeros[0]) + ' ' + '1 1')
main()


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


t = int(input())
from sys import *

def f(arr, k, x):
	count = 0
	for il in arr:
		count += il // x
	if count >= k:
		return True
	else:
		return False
for ip in range(t):
	arr = list(map(int, stdin.readline().split()))
	(x, y, z) = arr
	arr = sorted(arr)
	if arr[0] == arr[1] == arr[2]:
		print('YES')
		print(arr[0], arr[0], arr[0])
	elif arr[1] == arr[2]:
		print('YES')
		if x == arr[1] and y == arr[1]:
			print(arr[1], arr[0], arr[0])
		elif y == arr[1] and z == arr[1]:
			print(arr[0], arr[0], arr[1])
		else:
			print(arr[0], arr[1], arr[0])
	else:
		print('NO')


for _ in range(int(input())):
	li = list(map(int, input().strip().split()))
	(x, y, z) = (li[0], li[1], li[2])
	li.sort()
	if li[-1] != li[-2]:
		print('NO')
	else:
		print('YES')
		a = li[-1]
		b = li[0]
		c = b
		print(a, b, b)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x >= z:
		a = x
		b = z
		c = z
		print('YES')
		print(a, b, c)
	elif y == z and y >= x:
		c = y
		b = x
		a = x
		print('YES')
		print(a, b, c)
	elif x == z and x >= y:
		b = x
		a = y
		c = y
		print('YES')
		print(a, b, c)
	else:
		print('NO')


for i in range(int(input())):
	l = [int(num) for num in input().split()]
	m = max(l)
	if l.count(m) >= 2:
		n = min(l)
		print('YES')
		print(m, n, n)
	else:
		print('NO')


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	(x, y, z) = input(1)
	u = 0
	if x == y:
		u += 1
	if z == y:
		u += 1
	if x == z:
		u += 1
	if u == 0:
		out('NO')
		return
	if u == 1:
		r = max([x, y, z])
		log(r, [x, y, z].count(r))
		if [x, y, z].count(r) == 1:
			out('NO')
			return
	out('YES')
	p = set([x, y, z])
	q = list(p) + [1]
	if u == 3:
		out([x, y, z], 1)
		return
	out(q, 1)
	return
for i in range(input(11)):
	solve()


def main():
	t = Iint()
	for _ in range(t):
		(x, y, z) = Imap()
		if len({x, y, z}) == 3:
			print('NO')
		else:
			li = [x, y, z]
			m = max(x, y, z)
			try:
				li.remove(m)
				li.remove(m)
			except:
				print('NO')
			else:
				print('YES')
				print(max(x, y, z), min(x, y, z), 1)
FIO = 1

def I():
	return input()

def Iint():
	return int(input())

def Ilist():
	return list(map(int, input().split()))

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import sys
	import os
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for test in range(t):
	L = list(map(int, input().split()))
	a = L[0]
	b = L[1]
	c = L[2]
	mx = max(a, b, c)
	mn = min(a, b, c)
	cnt = 0
	if a == mx:
		cnt += 1
	if b == mx:
		cnt += 1
	if c == mx:
		cnt += 1
	if cnt < 2:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	u = [x, y, z]
	u.sort(reverse=True)
	if u[0] != u[1]:
		print('NO')
	else:
		print('YES')
		print(u[0], u[2], u[2])


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


from itertools import *
for i in range(int(input())):
	(x, y, z) = 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')


from sys import stdin
for _ in range(int(input())):
	(x, y, z) = map(int, stdin.readline().rstrip().split(' '))
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if z < x:
			print('YES')
			print(x, z, z)
		else:
			print('NO')
	elif x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(x, y, y)
	elif y == z:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(x, z, x)
	else:
		print('NO')


import os
import operator
import sys
from io import BytesIO, IOBase

def inar():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		(x, y, z) = map(int, input().split())
		if x == y == z:
			print('YES')
			print(x, x, x)
			continue
		if x == y and z <= x:
			print('YES')
			print(x, z, z)
		elif x == z and y <= z:
			print('YES')
			print(x, y, y)
		elif y == z and x <= y:
			print('YES')
			print(y, x, x)
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def solve(x, y, z):
	ret = None
	if x == y or x == z or y == z:
		duplicate = None
		if x == y:
			duplicate = x
			if duplicate < z:
				return 'NO'
			ret = [duplicate, z, 1]
		elif y == z:
			duplicate = y
			if duplicate < x:
				return 'NO'
			ret = [duplicate, x, 1]
		else:
			duplicate = z
			if duplicate < y:
				return 'NO'
			ret = [duplicate, y, 1]
	else:
		return 'NO'
	ret = list(map(str, ret))
	return 'YES\n' + ' '.join(ret)
t = int(input())
for T in range(t):
	(x, y, z) = map(int, input().split())
	print(solve(x, y, z))


t = int(input())
i = 0
while i < t:
	x = list(map(int, input().split()))
	x.sort()
	if x[0] <= x[1] and x[0] <= x[2] and (x[1] == x[2]):
		print('YES')
		print(x[2], x[0], x[0])
	else:
		print('NO')
	i += 1


def solve():
	a = list(map(int, input().split()))
	a.sort()
	if a[1] != a[2]:
		print('NO')
		return
	else:
		print('YES')
		print(a[0], ' ', a[0], ' ', a[2])
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	l = [int(x) for x in input().split()]
	l.sort(reverse=True)
	if l[0] != l[1]:
		print('NO')
	elif len(set(l)) == 3:
		print('NO')
	else:
		print('YES')
		print(l[0], l[-1], l[-1])


a = int(input())
for i in range(a):
	x1 = input()
	x = x1.split()
	y = list(set(x))
	y.sort()
	if len(y) == 3:
		print('NO')
	elif len(y) == 1:
		print('YES')
		print(x1)
	else:
		ans1 = y[0]
		ans2 = y[1]
		k1 = x.count(ans1)
		k2 = x.count(ans2)
		y.append('1')
		y = ' '.join(y)
		if k1 > k2:
			if int(ans1) > int(ans2):
				print('YES')
				print(y)
			else:
				print('NO')
		elif int(ans1) < int(ans2):
			print('YES')
			print(y)
		else:
			print('NO')


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from collections import Counter
from bisect import bisect_left
import sys
from queue import PriorityQueue
import operator as op
from functools import reduce
mod = 1000000007

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())

def printIn(ob):
	return stdout.write(str(ob) + '\n')

def powerLL(n, p):
	result = 1
	while p:
		if p & 1:
			result = result * n % mod
		p = int(p / 2)
		n = n * n % mod
	return result

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def myCode():
	lst = L()
	max_lst = max(lst)
	if lst.count(max_lst) == 3:
		print('YES')
		print(max_lst, max_lst, max_lst)
	elif lst.count(max_lst) == 2:
		print('YES')
		temp = 0
		for i in lst:
			if i < max_lst:
				temp = i
		if temp == 1:
			print(max_lst, temp, temp)
		else:
			print(max_lst, temp, temp - 1)
	else:
		print('NO')

def main():
	for t in range(I()):
		myCode()
main()


test = int(input())
for _ in range(test):
	l = input().split(' ')
	if int(l[0]) > int(l[1]) and int(l[0]) > int(l[2]):
		(l[0], l[1]) = (l[1], l[0])
		(l[0], l[2]) = (l[2], l[0])
		if int(l[2]) == int(l[1]):
			print('YES')
			print(int(l[0]), int(l[2]), int(l[0]))
		else:
			print('NO')
	elif int(l[0]) > int(l[2]):
		(l[0], l[2]) = (l[2], l[0])
		if int(l[2]) == int(l[1]):
			print('YES')
			print(int(l[0]), int(l[2]), int(l[0]))
		else:
			print('NO')
	elif int(l[0]) > int(l[1]):
		(l[0], l[1]) = (l[1], l[0])
		if int(l[2]) == int(l[1]):
			print('YES')
			print(int(l[0]), int(l[2]), int(l[0]))
		else:
			print('NO')
	elif int(l[2]) == int(l[1]):
		print('YES')
		print(int(l[0]), int(l[2]), int(l[0]))
	else:
		print('NO')


def pairwise_triplet(num_tuple):
	num_tuple = tuple(reversed(tuple(sorted(num_tuple))))
	if len(set(num_tuple)) == 1:
		return tuple(num_tuple)
	if len(set(num_tuple)) == 3 or num_tuple[1] == num_tuple[2]:
		return (-1, -1, -1)
	return (num_tuple[0], num_tuple[2], num_tuple[2])

def solve():
	for _ in range(int(input())):
		solution = pairwise_triplet(tuple([int(x) for x in input().split()]))
		if solution[0] == -1:
			print('NO')
		else:
			print('YES')
			print(' '.join([str(x) for x in solution]))
solve()


for _ in [0] * int(input()):
	x = sorted([int(i) for i in input().split()])
	if x[1] != x[2]:
		print('NO')
	else:
		print('YES')
		print(x[2], x[0], x[0])


t = int(input())
while t:
	t -= 1
	lst = list(map(int, input().split()))
	if lst.count(max(lst)) > 1:
		print('YES')
		print(min(lst), min(lst), max(lst))
	else:
		print('NO')


Test_case = int(input())
for i in range(Test_case):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	if x == y and x == z:
		print('YES')
		print('{} {} {}'.format(x, y, 1))
	elif x == y and x != z:
		if z > x:
			print('NO')
		else:
			print('YES')
			print('{} {} {}'.format(x, 1, z))
	elif x == z and x != y:
		if y > x:
			print('NO')
		else:
			print('YES')
			print('{} {} {}'.format(x, y, 1))
	elif z == y and x != z:
		if x > z:
			print('NO')
		else:
			print('YES')
			print('{} {} {}'.format(x, 1, z))
	elif x != y and y != z:
		print('NO')


t = int(input())
for test in range(t):
	(x, y, z) = [int(i) for i in input().split()]
	m = max(x, y, z)
	if (x == m) + (y == m) + (z == m) > 1:
		print('YES')
		print(m, min(x, y, z), min(x, y, z))
	else:
		print('NO')


import sys

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(x, y, z) = get_ints()
	qw = [x, y, z]
	k = set(qw)
	if len(k) == 3:
		print('NO')
		continue
	elif len(k) == 2:
		k = list(k)
		k.sort()
		if qw.count(k[0]) > qw.count(k[1]):
			print('NO')
			continue
		else:
			print('YES')
			if k[0] > 1:
				print(k[1], k[0], k[0] - 1)
			else:
				print(k[1], k[0], k[0])
	else:
		k = list(k)
		print('YES')
		print(k[0], k[0], k[0])


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	if len(set(l)) == len(l):
		print('NO')
	else:
		mx = max(l)
		if l.count(mx) >= 2:
			print('YES')
			l = list(set(l))
			a = l[0]
			b = l[-1]
			c = 1
			print(a, b, c)
		else:
			print('NO')


import math
import os
import random
import re
import sys
import copy
from collections import Counter

def solve():
	for _ in range(int(input())):
		l = list(map(int, input().strip().split()))
		l.sort(reverse=True)
		ma = max(l)
		if l.count(ma) == 1:
			print('NO')
		elif l.count(ma) == 3:
			print('YES')
			print(ma, ma, ma)
		else:
			print('YES')
			a = []
			a.append(ma)
			a.append(l[-1])
			a.append(l[-1])
			print(' '.join(map(str, a)))
solve()


for _ in range(int(input())):
	lis = list(map(int, input().split()))
	if len(set(lis)) == 3:
		print('NO')
	elif len(set(lis)) == 1:
		print('YES')
		print(' '.join([str(lis[0]), str(lis[0]), str(lis[0])]))
	else:
		lis.sort()
		if lis[-1] != lis[-2]:
			print('NO')
		else:
			print('YES')
			print(' '.join([str(lis[0]), str(lis[0]), str(lis[1])]))


for nt in range(int(input())):
	a = list(map(int, input().split()))
	a.sort()
	if len(set(a)) == 3:
		print('NO')
	elif len(set(a)) == 1:
		print('YES')
		print(a[0], a[0], a[0])
	elif a[0] == a[1]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[1])


t = int(input())
while t > 0:
	t = t - 1
	(x, y, z) = map(int, input().split())
	if max(x, y) == max(y, z) and max(y, z) == max(z, x):
		print('YES')
		a = max(x, y, z)
		b = min(x, y, z)
		l = [x, y, z]
		if l.count(a) > l.count(b):
			c = b
		else:
			c = a
		print(a, b, c)
	else:
		print('NO')


for test in range(int(input())):
	(a, b, c) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	if a == b and a == c:
		print('YES')
		print(a, a, a)
	elif a == b:
		if min(a, c) == a:
			print('NO')
		else:
			print('YES')
			print(c, c, a)
	elif b == c:
		if min(a, b) == b:
			print('NO')
		else:
			print('YES')
			print(a, a, b)
	elif a == c:
		if min(a, b) == a:
			print('NO')
		else:
			print('YES')
			print(b, b, a)
	else:
		print('NO')


t = int(input())
blst = []
nums = []
n = 0
for i in range(t):
	lst = list([int(q) for q in input().split()])
	lst.sort()
	if lst[0] != lst[1] and lst[0] != lst[2] and (lst[1] != lst[2]):
		blst.append('NO')
	elif lst[0] == lst[1] == lst[2]:
		blst.append('YES')
		nums.extend([lst[0], lst[0], lst[0]])
	elif lst[0] == lst[1]:
		blst.append('NO')
	else:
		blst.append('YES')
		nums.extend([lst[0], lst[0], lst[1]])
for i in range(t):
	if blst[i] == 'YES':
		print(blst[i])
		print(' '.join((str(k) for k in nums[n:n + 3])))
		n += 3
	else:
		print(blst[i])


def abc(x, y, z):
	if x == y and y == z and (z == x):
		a = x
		b = x
		c = x
	elif x != y and y != z and (z != x):
		return False
	elif x == y and x > z:
		a = x
		b = z
		c = 1
	elif y == z and y > x:
		a = y
		b = x
		c = 1
	elif x == z and x > y:
		a = x
		b = y
		c = 1
	else:
		return False
	return (a, b, c)
t = int(input())
while t != 0:
	(x, y, z) = map(int, input().split())
	if abc(x, y, z) == False:
		print('NO')
	else:
		(a, b, c) = abc(x, y, z)
		print('YES')
		print(a, ' ', b, ' ', c)
	t = t - 1


t = int(input())
for i in range(t):
	a = [int(i) for i in input().split()]
	b = []
	num = {}
	for i in a:
		if i in num:
			num[i] += 1
		else:
			num[i] = 1
	if len(num) == 2:
		for i in num:
			if i == max(a):
				if num[i] == 1:
					print('NO')
					break
				else:
					print('YES')
					if a[0] == a[1]:
						print(a[0], a[2], a[2])
					elif a[0] == a[2]:
						print(a[1], a[0], a[1])
					else:
						print(a[0], a[0], a[1])
					break
	elif len(num) == 1:
		print('YES')
		print(*a)
	else:
		print('NO')


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))
(t,) = mp()
for _ in range(t):
	(x, y, z) = mp()
	if z == y and y >= x:
		cout('YES\n' + str(x) + ' ' + str(x) + ' ' + str(y) + '\n')
	elif x == z and z >= y:
		cout('YES\n' + str(x) + ' ' + str(y) + ' ' + str(y) + '\n')
	elif x == y and x >= z:
		cout('YES\n' + str(x) + ' ' + str(z) + ' ' + str(z) + '\n')
	else:
		cout('NO\n')


testscases = int(input())
for testcase in range(testscases):
	temparr = input()
	temparr = temparr.split()
	x = int(temparr[0])
	y = int(temparr[1])
	z = int(temparr[2])
	if x == y and y == z:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
		continue
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x < y and y == z:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(y))
		continue
	if x > y and y == z:
		print('NO')
		continue
	if x == z and x > y:
		print('YES')
		print(str(x) + ' ' + str(y) + ' ' + str(y))
		continue
	if x == z and y > z:
		print('NO')
		continue
	if x == y and x > z:
		print('YES')
		print(str(x) + ' ' + str(z) + ' ' + str(z))
		continue
	if x == y and z > y:
		print('NO')
		continue
	print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if z < x:
			print('YES')
			print(z, z, x)
		else:
			print('NO')
	elif y == z:
		if x < y:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
	elif z == x:
		if y < z:
			print('YES')
			print(y, y, z)
		else:
			print('NO')
	else:
		print('NO')
		continue


from sys import stdin, stdout
import functools
import sys, os, math
T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (z != x) or (x == y and x < z) or (x == z and x < y) or (z == y and z < x):
		print('NO')
		continue
	print('YES')
	if x == y:
		print(x, z, z)
	elif x == z:
		print(y, x, y)
	elif y == z:
		print(x, x, y)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	inputs = [int(x) for x in input().split()]
	value_counts = {}
	for x in inputs:
		if x in value_counts:
			value_counts[x] += 1
		else:
			value_counts[x] = 1
	if len(value_counts) == 3:
		print('NO')
	if len(value_counts) == 2:
		minv = min(list(value_counts.keys()))
		maxv = max(list(value_counts.keys()))
		if value_counts[minv] == 1:
			print('YES')
			out_string = ''
			out_string += str(minv) + ' '
			out_string += str(maxv) + ' '
			out_string += str(minv)
			print(out_string)
		else:
			print('NO')
	if len(value_counts) == 1:
		val = list(value_counts.keys())[0]
		print('YES')
		out_string = (str(val) + ' ') * 2 + str(val)
		print(out_string)


t = int(input())
while t > 0:
	t -= 1
	l = list(map(int, input().split()))
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])


t = int(input())
while t:
	xyz = list(map(int, input().split()))
	(x, y, z) = (xyz[0], xyz[1], xyz[2])
	xyz.sort()
	flag = True
	(a, b, c) = (0, 0, 0)
	if (x != y and y != z) and x != z:
		flag = False
	elif xyz[1] < xyz[2]:
		flag = False
	elif x == y and y == z:
		(a, b, c) = (x, x, x)
	else:
		(a, b, c) = (xyz[0], xyz[0], xyz[2])
	if flag:
		print('YES')
		print(a, b, c)
	else:
		print('NO')
	t -= 1


def main():
	(x, y, z) = map(int, input().split())
	cnt = 0
	if x == y:
		cnt += 1
	if y == z:
		cnt += 1
	if x == z:
		cnt += 1
	if cnt <= 0:
		print('NO')
		return
	elif cnt == 1:
		if x == y and z > x or (x == z and y > x) or (y == z and x > y):
			print('NO')
			return
		else:
			print('YES')
			if x == y:
				a = x
				b = z
				c = b
			elif x == z:
				a = x
				b = y
				c = b
			else:
				a = y
				b = x
				c = b
			print(a, b, c)
			return
	elif cnt == 3:
		print('YES')
		print(x, y, z)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


from sys import *
input = stdin.readline
t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	s = set(l)
	n = len(s)
	if n == 3:
		print('NO')
	elif n == 1:
		print('YES')
		print(l[0], l[0], l[0])
	elif l.count(max(l)) != 2:
		print('NO')
	else:
		print('YES')
		print(max(l), min(l), 1)


testcase = int(input())
for i in range(testcase):
	li = list(map(int, input().split()))
	val = max(li)
	if li.count(val) >= 2:
		print('YES')
		print(min(li), min(li), max(li))
	else:
		print('NO')


t = int(input())
d = []
for i in range(t):
	d.append(sorted(list(map(int, input().split()))))
for i in range(t):
	if d[i].count(max(d[i])) == 2:
		print('YES')
		print(1, d[i][0], d[i][1])
	elif d[i][0] == d[i][1] == d[i][2]:
		print('YES')
		print(d[i][0], d[i][0], d[i][0])
	else:
		print('NO')


from collections import Counter
t = int(input())
for t in range(t):
	l = list(map(int, input().split()))[:3]
	l.sort(reverse=True)
	if l[0] == l[1] == l[2]:
		print('YES')
		print(l[0], l[0], l[0])
	elif l[0] == l[1] and l[0] > l[2]:
		print('YES')
		print(l[0], l[2], l[2])
	else:
		print('NO')


for t in range(int(input())):
	(x, y, z) = [int(x) for x in input().split(' ')]
	if x == y and x < z or (x == z and x < y) or (y == z and y < x) or (x != y and x != z and (y != z)):
		print('NO')
	else:
		print('YES')
		s = sorted(list({x, y, z}))
		if len(s) > 1:
			print(s[0], s[0], s[1])
		else:
			print(s[0], s[0], s[0])


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	a = 0
	b = 0
	c = 0
	f = 0
	if x == y and z < x:
		a = x
		b = z
		c = b
		f = 1
	if y == z and y > x:
		c = y
		a = x
		b = a
		f = 1
	if x == z and x > y:
		b = x
		a = y
		c = a
		f = 1
	if x != y and (z == x and z > y or (z == y and z > x)):
		b = x
		c = y
		if z == x:
			a = y
		else:
			a = x
		f = 1
	if x == y == z:
		a = x
		b = x
		c = x
		f = 1
	if f == 0:
		print('NO')
	else:
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))


import sys
import random
from fractions import Fraction
from math import *

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

def iinput():
	return int(input())

def finput():
	return float(input())

def tinput():
	return input().split()

def linput():
	return list(input())

def rinput():
	return map(int, tinput())

def fiinput():
	return map(float, tinput())

def rlinput():
	return list(map(int, input().split()))

def trinput():
	return tuple(rinput())

def srlinput():
	return sorted(list(map(int, input().split())))

def NOYES(fl):
	if fl:
		print('NO')
	else:
		print('YES')

def YESNO(fl):
	if fl:
		print('YES')
	else:
		print('NO')

def main():
	q = rlinput()
	if q.count(max(q)) == 1:
		print('NO')
	else:
		print('YES')
		if q[0] == max(q):
			q[0] = min(q)
		elif q[1] == max(q):
			q[1] = min(q)
		else:
			q[2] = min(q)
		print(q[0], q[1], q[2])
for i in range(iinput()):
	main()


numberOfTc = int(input())
for ctr in range(1, numberOfTc + 1):
	lis = list(map(int, input().split()))
	lis.sort()
	if lis[-1] != lis[-2]:
		print('NO')
	else:
		print('YES')
		print(lis[0], lis[0], lis[2])


for t in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and x != z and (y != z):
		print('NO')
	elif x == y and x < z:
		print('NO')
	elif z == y and y < x:
		print('NO')
	elif x == z and x < y:
		print('NO')
	else:
		print('YES')
		if x == z and y > 1:
			print(y - 1, x, y)
		elif x == y and z > 1:
			print(z - 1, x, z)
		elif y == z and x > 1:
			print(x - 1, y, x)
		elif x == y and z == 1:
			print(z, z, x)
		elif x == z and y == 1:
			print(y, y, x)
		elif z == y and x == 1:
			print(x, x, y)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	mx = max(x, y, z)
	if [x, y, z].count(mx) < 2:
		print('NO')
		continue
	print('YES')
	if x == mx and y == mx:
		print(mx, z, z)
	elif x == mx and z == mx:
		print(mx, y, y)
	elif z == mx and y == mx:
		print(mx, x, x)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	m = max(max(a, b), c)
	m1 = min(min(a, b), c)
	x = a ^ b ^ c
	if a != b and b != c and (c != a):
		print('NO')
	elif x == m:
		if a == b and b == c and (c == a):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
	else:
		print('YES')
		if m1 == 1:
			print(m1, m1, m)
		else:
			print(m, m1, m1 - 1)


from math import *
from collections import *
from itertools import *
from functools import *
from bisect import *
from heapq import *
from operator import *
from sys import *
setrecursionlimit(100000000)
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	c = Counter(l)
	if len(c) == 3:
		print('NO')
	elif len(c) == 1:
		print('YES')
		print(x, y, x)
	elif len(c) == 2:
		t = c.most_common(2)
		if t[0][0] > t[1][0]:
			print('YES')
			print(t[0][0], t[1][0], t[1][0])
		else:
			print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	a.sort()
	x = max(a)
	if a.count(x) > 1:
		print('YES')
		(x, y, z) = (a[-1], a[0], a[0] - 1)
		if z == 0:
			print(x, y, y)
		else:
			print(x, y, z)
	else:
		print('NO')


nCases = int(input())
cases = [sorted([int(x) for x in input().split()]) for _ in range(nCases)]
for case in cases:
	if case[1] != case[2]:
		print('NO')
		continue
	print('YES')
	print(case[0], case[0], case[1])


noOfTestCases = int(input())
arrInput = []
for i in range(noOfTestCases):
	arrInput.append(list(map(int, input().split(' '))))

def solve(input):
	for i in range(len(input)):
		minimun = min(input[i])
		input[i].pop(input[i].index(minimun))
		if input[i][0] == input[i][1] and minimun <= input[i][0]:
			a = input[i][0]
			b = minimun
			c = minimun - 1 if minimun - 1 > 0 else 1
			print('YES\n', a, b, c)
		else:
			print('NO')
solve(arrInput)


from itertools import permutations, combinations
loop = int(input())
while loop != 0:
	loop -= 1
	(x, y, z) = input().split()
	(x, y, z) = (int(x), int(y), int(z))
	check = True
	answer = ''
	temp = [x, y, z]
	a = max(temp)
	if x == a and y == a or (x == a and z == a) or (y == a and z == a):
		answer += str(a) + ' '
	else:
		check = False
	b = min(temp)
	if check == True:
		print('YES\n' + answer + ' ' + str(b) + ' ' + str(b))
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	if x == z:
		if x > y:
			print('YES')
			print(x, y, y)
		if x < y:
			print('NO')
	if y == z:
		if y > x:
			print('YES')
			print(y, x, x)
		if y < x:
			print('NO')
	if x == y:
		if x > z:
			print('YES')
			print(x, z, z)
		if x < z:
			print('NO')
	if x != y and x != z and (y != z):
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (z != x) or (x == y and x < z or (y == z and y < x) or (z == x and z < y)):
		print('NO')
	else:
		print('YES')
		if x == y == z:
			print(x, y, z)
		elif x == y:
			print(z, z, x)
		elif y == z:
			print(x, x, y)
		elif z == x:
			print(y, y, z)
	t = t - 1


for i in range(int(input())):
	a = list(map(int, input().strip().split()))[:3]
	c = set(a)
	if len(c) == 3:
		print('NO')
	elif a.count(min(c)) == 2:
		print('NO')
	elif len(c) == 1:
		print('YES')
		print(str(a[0]) + ' ' + str(a[0]) + ' ' + str(a[0]))
	else:
		print('YES')
		print(str(max(c)) + ' ' + str(min(c)) + ' ' + str(min(c)))


t = int(input())
for _ in range(t):
	a = [int(x) for x in input().split()]
	a.sort()
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[2])


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b and b > c or (a == c and a > b) or (b == c and b > a):
		print('YES')
		print(min(a, b, c), min(a, b, c), max(a, b, c))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	xyz = list(map(int, input().split()))
	if xyz.count(max(xyz)) < 2:
		print('NO')
		continue
	else:
		print('YES')
		print(max(xyz), min(xyz), min(xyz), sep=' ')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	if a[0] != a[1] and a[0] != a[2] and (a[1] != a[2]):
		print('NO')
	elif a[0] == a[1] and a[0] >= a[2]:
		print('YES')
		print(a[0], end=' ')
		print(a[2], end=' ')
		print(a[2])
	elif a[1] == a[2] and a[1] >= a[0]:
		print('YES')
		print(a[1], end=' ')
		print(a[0], end=' ')
		print(a[0])
	elif a[0] == a[2] and a[0] >= a[1]:
		print('YES')
		print(a[0], end=' ')
		print(a[1], end=' ')
		print(a[1])
	else:
		print('NO')


for tc in range(int(input())):
	lis = [int(i) for i in input().split()]
	lis.sort()
	if lis[1] == lis[2]:
		print('YES')
		print(lis[0], lis[0], lis[1])
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	(x, y, z) = (a[0], a[1], a[2])
	if x == y == z:
		print('YES')
		print(x, z, z)
	elif x == y:
		print('YES')
		print(x, z, z)
	elif y == z:
		print('NO')
	else:
		print('NO')


def findMax(x, y, z):
	if x == y == z:
		return (x, y, z)
	if x == y:
		if z > y:
			return 'NO'
		return (x, z, z)
	if x == z:
		if y > x:
			return 'NO'
		return (y, x, y)
	if y == z:
		if x > y:
			return 'NO'
		return (x, x, y)
	return 'NO'
n = int(input())
for _ in range(n):
	(x, y, z) = map(int, input().split())
	ans = findMax(x, y, z)
	if ans == 'NO':
		print(ans)
	else:
		print('YES')
		print(*ans)


def solve1():
	(x, y, z) = map(int, input().split())
	if [x, y, z].count(max(x, y, z)) == 2:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
	elif x == y == z:
		print('YES')
		print(x, y, z)
	else:
		print('NO')
for _ in range(int(input())):
	solve1()


t = int(input())
for _ in range(t):
	xyz = list(map(int, input().split()))
	cc = {}
	for c in xyz:
		if c in cc:
			cc[c] += 1
		else:
			cc[c] = 1
	if len(cc) == 3 or cc[max(xyz)] < 2:
		print('NO')
	else:
		print('YES')
		res = [min(xyz), min(xyz), max(xyz)]
		print(' '.join(list(map(str, res))))


test = int(input())
while test:
	nums = list(map(int, input().split()))
	ans = ''
	m = max(nums)
	if nums.count(m) == 2:
		i = nums.index(m)
		nums[i] = 1
		print('YES')
		for i in nums:
			print(i, end=' ')
		print()
	elif nums.count(m) == 3:
		print('YES')
		for i in nums:
			print(i, end=' ')
		print()
	else:
		print('NO')
	test -= 1


t = int(input())
for s in range(t):
	l = list(map(int, input().split()))
	mx = max(l)
	mn = min(l)
	if l.count(mx) > 1:
		print('YES')
		if l.count(mx) == 2:
			print(mx, mn, mn)
		else:
			print(mx, mx, mn)
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	a.sort()
	d = {}
	for i in a:
		if i not in d:
			d[i] = 0
		d[i] += 1
	if d[a[-1]] == 1:
		print('NO')
	elif d[a[-1]] == 3:
		print('YES')
		print(a[-1], a[-1], a[-1])
	else:
		print('YES')
		print(a[-1], min(a[0], a[1]), min(a[0], a[1]))


import math

def swap(a, b):
	c = a
	a = b
	b = c
	return [a, b]

def iscorrect(a, b, c, x, y, z):
	if max(a, b) == x and max(b, c) == z and (max(a, c) == y):
		return True
	return False
for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	sl = {a, b, c}
	if len(sl) == 1:
		print('YES')
		print(a, b, c)
		continue
	if len(sl) == 2:
		th = min(sl) - 1
		if th < 1:
			th = 1
		arr = [list(sl)[0], list(sl)[1], th]
	if len(sl) == 3:
		arr = [list(sl)[0], list(sl)[1], list(sl)[2]]
	z = 0
	for j in range(3):
		if iscorrect(arr[0], arr[1], arr[2], a, b, c):
			z = 1
			break
		s = swap(arr[0], arr[1])
		arr[0] = s[0]
		arr[1] = s[1]
		if iscorrect(arr[0], arr[1], arr[2], a, b, c):
			z = 1
			break
		s = swap(arr[1], arr[2])
		arr[1] = s[0]
		arr[2] = s[1]
	if z == 0:
		print('NO')
	if z == 1:
		print('YES')
		print(arr[0], arr[1], arr[2])


n = int(input())
T = []
while n > 0:
	n -= 1
	T = list(map(int, input().split()))
	T_set = set(T)
	T_set_list = list(T_set)
	if len(T_set_list) == 2:
		B = 0
		for i in T:
			if i == max(T):
				B += 1
		if B == 1:
			print('NO')
			continue
	elif len(T_set_list) == 3:
		print('NO')
		continue
	print('YES')
	if T[0] == min(T):
		print(T[0], T[0], max(T))
	elif T[1] == min(T):
		print(T[1], max(T), T[1])
	elif T[2] == min(T):
		print(max(T), T[2], T[2])


for _ in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	if x != y and y != z and (x != z):
		print('NO')
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y:
		if z > x:
			print('NO')
		else:
			print('YES')
			print(x, z, 1)
		continue
	if z == y:
		if z < x:
			print('NO')
		else:
			print('YES')
			print(x, 1, y)
		continue
	if x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(y, z, 1)
		continue


t = int(input())
while t > 0:
	arr = list(map(int, input().split()))
	if arr.count(max(arr)) >= 2:
		print('YES')
		print(max(arr), min(arr), min(arr))
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	lst = list(map(int, input().split()))
	lst = sorted(lst, reverse=True)
	if lst[0] == lst[1]:
		print('YES')
		print(lst[0], lst[2], lst[2])
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	l = [[int(x), 0] for x in input().split()]
	l[1][1] = 1
	l[2][1] = 2
	l.sort(key=lambda x: x[0])
	if l[2][0] != l[1][0]:
		print('NO')
	else:
		print('YES')
		l.sort(key=lambda x: x[1])
		print(min(l[0][0], l[1][0]), min(l[0][0], l[2][0]), min(l[1][0], l[2][0]))


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	if len(set(l)) == 1:
		print('YES')
		print(str(l[0]) + ' ' + str(l[1]) + ' ' + str(l[2]))
	elif l.count(max(l)) == 2:
		if min(l) == 1:
			print('YES')
			print(str(max(l)) + ' ' + '1  1')
		else:
			e = sorted(l)
			print('YES')
			print(str(e[0] - 1) + ' ' + str(e[0]) + ' ' + str(e[2]))
	else:
		print('NO')


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	n = min(x, y, z)
	if x == y == z:
		print('Yes')
		print(x, x, x)
	elif 2 * m + n == x + y + z:
		print('Yes')
		print(1, n, m)
	else:
		print('No')


def ThreePairWise(x):
	x.sort()
	if x[1] == x[2]:
		print('YES')
		print(x[0], x[0], x[2])
		return
	print('NO')
t = int(input())
for i in range(t):
	x = list(map(int, input().split()))
	ThreePairWise(x)


test = int(input())
while test > 0:
	li = [int(x) for x in input().split()]
	m1 = max(li)
	if len(set(li)) == len(li) or li.count(m1) < 2:
		print('NO')
	else:
		print('YES')
		i = 0
		while i < len(li) and li.count(m1) != 3:
			if li[i] == m1:
				li[i] = 1
			i += 1
		m2 = max(li)
		print(m1, m2, 1)
	test -= 1


import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		(a, b, c) = map(int, input().split())
		if a == b and a == c:
			print('YES')
			print(a, a, a)
		else:
			ar = [a, b, c]
			ar.sort()
			if ar[1] == ar[2]:
				print('YES')
				print(ar[0], ar[0], ar[2])
			else:
				print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	mylist = list(map(int, input().split()))
	mx = max(mylist)
	mn = min(mylist)
	count = mylist.count(mx)
	if count < 2:
		print('NO')
	elif count == 3:
		print('YES')
		print(*mylist)
	elif mylist[0] == mx:
		print('YES')
		print(mx, mn, mn)
	else:
		print('YES')
		print(mn, mn, mx)


t = int(input())
for i in range(t):
	l = list(map(int, input().split(' ')))
	a = max(l)
	if l.count(a) > 1:
		print('YES')
		print(a, min(l), min(l))
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		continue
	r = max(x, y, z)
	e = min(x, y, z)
	if x == r and y == r:
		print('YES')
		print(r, e, e)
		continue
	if x == r and z == r:
		print('YES')
		print(e, r, e)
		continue
	if y == r and z == r:
		print('YES')
		print(e, e, r)
		continue
	print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	if [x, y, z].count(m) > 1:
		print('YES')
		print(m, min(x, y, z), 1)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	x = list(map(int, input().split()))
	y = max(x)
	y2 = min(x)
	y1 = x.count(y)
	if x[0] == x[1] == x[2]:
		print('YES')
		print(x[0], x[1], x[2])
	elif x[0] != x[1] and x[0] != x[2] and (x[1] != x[2]):
		print('NO')
	elif y1 == 1:
		print('NO')
	else:
		print('YES')
		print(y2, y2, y)


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and x < z or (y == z and z < x) or (z == x and z < y):
		print('NO')
	else:
		print('YES')
		print(min(x, y, z), end=' ')
		print(min(x, y, z), end=' ')
		print(max(x, y, z))


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


def main():
	for _ in range(int(input())):
		(x, y, z) = sorted(map(int, input().split()))
		print('NO' if y < z else f'YES\n{x} {x} {z}')
main()


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def DFS(root, g, vis, ans):
	vis[root] = 1
	for c in g[root]:
		if vis[c] == 0:
			ans.append(c)
			DFS(c, g, vis, ans)
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	(x, y, z) = list(map(int, stdin.readline().rstrip().split()))
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y:
		if x > z:
			print('YES')
			print(z, z, x)
		else:
			print('NO')
	elif y == z:
		if y > x:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
	elif z == x:
		if z > y:
			print('YES')
			print(y, y, z)
		else:
			print('NO')
	else:
		print('NO')


for z in range(int(input())):
	a = [int(i) for i in input().split()]
	if len(set(a)) == 1:
		print('YES')
		print(*a)
	elif len(set(a)) == 3:
		print('NO')
	else:
		a.sort()
		if a[1] == a[2]:
			print('YES')
			print(a[2], a[0], 1)
		else:
			print('NO')


def main():
	for _ in [0] * int(input()):
		li = [int(i) for i in input().split(' ')]
		li.sort(reverse=True)
		(x, y, z) = (li[0], li[1], li[2])
		(a, b, c) = [0, 0, 0]
		if x == y and y == z:
			a = x
			b = x
			c = x
		elif x == y:
			a = x
			b = z
			if b > 1:
				c = z - 1
			else:
				c = z
		elif x != y:
			print('NO')
			continue
		print('YES')
		print(f'{a} {b} {c}')
main()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if 2 * max(a, b, c) + min(a, b, c) == a + b + c:
		print('YES')
		if a == max(a, b, c) and b == max(a, b, c):
			print(c, a, c)
		elif a == max(a, b, c) and c == max(a, b, c):
			print(a, b, b)
		elif b == max(a, b, c) and c == max(a, b, c):
			print(a, a, b)
	else:
		print('NO')


n = int(input())
ans = []
for _ in range(n):
	arr = sorted(list(map(int, input().split())))
	if arr[0] > 0 and arr[1] == arr[2]:
		ans.append('YES')
		ans.append(str(arr[2]) + ' ' + str(arr[0]) + ' ' + str(arr[0]))
	else:
		ans.append('NO')
print('\n'.join(ans))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	result = False
	if x == y == z:
		result = True
		print('YES')
		print(x, y, z)
	elif x == y:
		if x > z:
			result = True
			print('YES')
			print('{0} {1} {2}'.format(z, z, x))
	elif x == z:
		if x > y:
			result = True
			print('YES')
			print('{0} {1} {2}'.format(y, y, x))
	elif y == z:
		if y > x:
			result = True
			print('YES')
			print('{0} {1} {2}'.format(x, x, y))
	if result == False:
		print('NO')


from collections import Counter
from sys import stdin
input = stdin.readline
INF = 10 ** 9 + 7
MAX = 10 ** 7 + 7
MOD = 10 ** 9 + 7
for Ti in range(int(input().strip())):
	l = [int(x) for x in input().strip().split()]
	l.sort()
	c = Counter(l)
	if len(c) == 1:
		print('YES')
		print(*l)
	elif len(c) == 2:
		mini = min(l)
		maxa = max(l)
		if c[mini] == 2:
			print('NO')
		else:
			print('YES')
			print(maxa, mini, mini)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y or z == x or z == y:
		if [x, y, z].count(max(x, y, z)) == 2 or [x, y, z].count(max(x, y, z)) == 3:
			if [x, y, z].count(x) == 3:
				print('YES')
				print(x, x, x)
			elif x == min(x, y, z):
				print('YES')
				print(x, x, z)
			elif y == min(x, y, z):
				print('YES')
				print(y, z, y)
			else:
				print('YES')
				print(x, z, z)
		else:
			print('NO')
	else:
		print('NO')


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


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x == y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y:
		a = x
		if x < z:
			print('NO')
			continue
		b = z
		c = b - 1
		if c <= 0:
			c = b
	elif y == z:
		c = y
		if x > y:
			print('NO')
			continue
		a = x
		b = a - 1
		if b <= 0:
			b = a
	elif z == x:
		b = z
		if y > x:
			print('NO')
			continue
		a = y
		c = a - 1
		if c <= 0:
			c = a
	print('YES')
	print(a, b, c)


def solve():
	(*a,) = map(int, input().split())
	end = False
	for x in a:
		for y in a:
			for z in a:
				if max(x, y) == a[0] and max(x, z) == a[1] and (max(y, z) == a[2]) and (not end):
					print('YES')
					print(x, y, z)
					end = True
	if not end:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


t = int(input())
while t > 0:
	(x, y, z) = list(map(int, input().split()))
	big = max(x, y, z)
	small = min(x, y, z)
	count = 0
	if big == x:
		count += 1
	if big == y:
		count += 1
	if big == z:
		count += 1
	if count == 3:
		print('YES')
		print(big, big, big)
	if count == 2:
		print('YES')
		print(big, small, small)
	if count < 2:
		print('NO')
	t = t - 1


t = int(input())
answer = []
for a in range(t):
	line = [int(i) for i in input().split()]
	line.sort()
	if line[1] != line[2]:
		answer.append('NO')
	else:
		reg = 'YES\n' + str(line[0]) + ' ' + str(line[0]) + ' ' + str(line[2])
		answer.append(reg)
for b in answer:
	print(b)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	(q, w, e) = sorted((x, y, z))
	if w == e:
		print('YES')
		if q == y:
			print(q, w, q)
		elif x == y:
			print(w, q, q)
		else:
			print(q, q, w)
	else:
		print('NO')


def main():
	t = input()
	for i in range(int(t)):
		s = input()
		s = s.split(' ')
		x = int(s[0])
		y = int(s[1])
		z = int(s[2])
		if x == y == z:
			print('YES')
			print(x, y, z)
		elif y == z and x < y:
			print('YES')
			print(x, x, y)
		elif x == y and z < y:
			print('YES')
			print(x, z, z)
		elif x == z and y < x:
			print('YES')
			print(y, x, y)
		elif y == z and x > y or (x == y and z > x) or (x == z and y > x):
			print('NO')
		else:
			print('NO')
main()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	x = sorted([int(i) for i in input().split()])
	if x[1] == x[2]:
		print('YES')
		print(x[0], x[0], x[2])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	mn = min(x, y, z)
	a = list([x, y, z])
	if a.count(m) < 2:
		print('NO')
	else:
		print('YES')
		print(m, mn, mn)


t = int(input())
for i in range(t):
	(x, y, z) = sorted(map(int, input().split()))
	if z <= y:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(y))
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	maxi = max(x, y, z)
	mini = min(x, y, z)
	c = 0
	if x == maxi:
		c += 1
	if y == maxi:
		c += 1
	if z == maxi:
		c += 1
	if c == 3:
		print('yes')
		print(maxi, maxi, maxi)
	if c == 2:
		print('yes')
		print(maxi, mini, mini)
	if c < 2:
		print('NO')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split(' ')))
	if arr.count(max(arr)) < 2:
		print('NO')
	else:
		print('YES')
		print(f'{min(arr)} {min(arr)} {max(arr)}')


t = int(input())
for case in range(t):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	if [x, y, z].count(m) >= 2:
		print('YES')
		if x == y == m:
			print(x, z, z)
		elif y == z == m:
			print(x, x, z)
		else:
			print(y, y, x)
	else:
		print('NO')


t = int(input())
import math
for i in range(t):
	(a, b, c) = map(int, input().split())
	if sorted(list(set([a, b, c]))) == sorted([a, b, c]):
		print('NO')
		continue
	if a == b == c:
		print('YES')
		print(a, b, c)
		continue
	else:
		f = sorted([a, b, c])
		if f[2] > f[1] and f[2] > f[0]:
			print('NO')
			continue
		print('YES')
		x = list(set([a, b, c]))
		f = [1] + x
		print(*f)
		continue


t = int(input())
while t > 0:
	p = list(map(int, input().strip().split()))[:3]
	max_e = max(p)
	c2 = p.count(max_e)
	if c2 >= 2:
		a = max_e
		b = 1
		c = 1
		if c2 == 3:
			a = p[0]
			b = p[1]
			c = p[2]
		else:
			c = min(p)
		print('YES')
		print(a, b, c)
	else:
		print('NO')
	t = t - 1


t = int(input())
while t > 0:
	(a, b, c) = map(int, input().split())
	l = [a, b, c]
	s = set(l)
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(a, a, a)
	elif a == b:
		if c > a:
			print('NO')
		else:
			print('YES')
			print(a, c, c)
	elif b == c:
		if a > b:
			print('NO')
		else:
			print('YES')
			print(b, a, a)
	elif a == c:
		if b > a:
			print('NO')
		else:
			print('YES')
			print(a, b, b)
	t = t - 1


t = int(input())
while t > 0:
	l = [int(i) for i in input().split()]
	if len(set(l)) == 3:
		print('NO')
	elif l[0] == l[2] and l[0] != l[1]:
		if l[1] < l[0] and l[1] < l[2]:
			print('YES')
			print(min(l), max(l), min(l))
		else:
			print('NO')
	elif l[1] == l[2] and l[1] != l[0]:
		if l[0] < l[1] and l[0] < l[2]:
			print('YES')
			print(min(l), min(l), max(l))
		else:
			print('NO')
	elif l[0] == l[1] and l[0] != l[2]:
		if l[2] < l[0] and l[2] < l[1]:
			print('YES')
			print(max(l), min(l), min(l))
		else:
			print('NO')
	elif l[0] == l[1] == l[2]:
		print('YES')
		print(*l)
	t -= 1


from collections import deque
import sys

def inp():
	return sys.stdin.readline().strip()
for _ in range(int(inp())):
	(x, y, z) = map(int, inp().split())
	mx = max(x, y, z)
	freq = {}
	freq[x] = freq[y] = freq[z] = 0
	freq[x] += 1
	freq[y] += 1
	freq[z] += 1
	if freq[mx] < 2:
		print('NO')
	else:
		print('YES')
		print(mx, min(x, y, z), min(x, y, z))


dct = {1: 0, 2: 1, 3: 2}

def solve():
	(a, b, c) = map(int, input().split())
	lst = [[a, 0], [b, 1], [c, 2]]
	lst.sort(reverse=True)
	if lst[0][0] == lst[1][0]:
		ans = [lst[2][0], lst[2][0], lst[2][0]]
		ans[dct[lst[0][1] + lst[1][1]]] = lst[0][0]
		print('YES')
		print(*ans)
	else:
		print('NO')
for i in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	(x, y, z) = sorted([int(x) for x in input().split()])[::-1]
	if x != y:
		print('NO')
	else:
		print('YES')
		print(x, z, '1')


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	if max(x, y, z) == x:
		if x == y:
			print('YES')
			print(z, x, z)
		elif x == z:
			print('YES')
			print(x, y, y)
		else:
			print('NO')
	elif max(x, y, z) == y:
		if x == y:
			print('YES')
			print(z, x, z)
		elif y == z:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	arr = list(sorted(map(int, input().split())))
	(x, y, z) = (arr[0], arr[1], arr[2])
	if z == y:
		print('YES')
		if z == x:
			print(x, y, z)
		else:
			print(z, x, 1)
	else:
		print('NO')


res = ''
for _ in range(int(input())):
	arr = list(map(int, input().split()))
	arr.sort()
	if arr[1] != arr[2]:
		res += 'NO\n'
	else:
		res += 'YES\n%d %d %d\n' % (arr[2], arr[0], arr[0])
print(res)


from sys import stdin
for _ in range(int(stdin.readline())):
	(x, y, z) = sorted(map(int, stdin.readline().split()))
	if y == z:
		print('YES')
		print(z, x, x)
	else:
		print('NO')


T = int(input())
for t in range(T):
	arr = [int(x) for x in input().split(' ')]
	arr.sort()
	(x, y, z) = arr
	c = z
	b = x
	a = 1
	if y != c:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


for i in range(int(input())):
	arr = input().split()
	arr = sorted([int(k) for k in arr])
	if arr[1] != arr[2]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[0], arr[2])


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	flag = 0
	if a == b:
		if a >= c:
			print('YES')
			print(c, c, a)
			flag = 1
	elif a == c:
		if a >= b:
			print('YES')
			print(b, b, a)
			flag = 1
	elif b == c:
		if b >= a:
			print('YES')
			print(a, a, b)
			flag = 1
	if flag == 0:
		print('NO')


import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def check_sorted(a):
	for i in range(len(a) - 1):
		if a[i] > a[i + 1]:
			return False
	return True

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def main():
	for i in range(ii()):
		(x, y, z) = mi()
		if x == y and y == z:
			print('YES')
			print(x, y, z)
			continue
		if x != y and y != z and (x != z) or (x > y and x > z) or (y > x and y > z) or (z > x and z > y):
			print('NO')
			continue
		a = max(x, y, z)
		b = min(x, y, z)
		c = b
		print('YES')
		print(a, b, c)
main()


t = input()
t = int(t)
while t > 0:
	(x, y, z) = input().split()
	(x, y, z) = (int(x), int(y), int(z))
	s = set()
	a = [x, y, z]
	a.sort()
	i = a[0]
	j = a[1]
	s.add(x)
	s.add(y)
	s.add(z)
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	elif i == j:
		print('NO')
	else:
		print('YES')
		print(str(i) + ' ' + str(i) + ' ' + str(a[2]))
	a = [x, y, z]
	a.sort()
	t -= 1


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split(' '))
	l = [x, y, z]
	s = len(set(l))
	if s == 1:
		print('YES')
		print(f'{x} {x} {x}')
	elif s == 3:
		print('NO')
	else:
		maximum = max(l)
		if l.count(maximum) == 2:
			second_element = list(set(l).difference(set([maximum])))[0]
			print('YES')
			print(f'{maximum} {second_element} {second_element}')
		else:
			print('NO')
	t = t - 1


T = int(input())
for t in range(T):
	s = [int(x) for x in input().split()]
	m = max(s)
	if s.count(m) < 2:
		print('NO')
	else:
		l = [m]
		m = min(s)
		l.append(m)
		l.append(m)
		print('YES')
		print(*l)


T = int(input())
for t in range(T):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	c = 0
	if x == m:
		c += 1
	if y == m:
		c += 1
	if z == m:
		c += 1
	if c < 2:
		print('NO')
	else:
		print('YES')
		if x == y:
			a = x
			b = z
			c = z
		if y == z:
			a = x
			b = x
			c = z
		if x == z:
			a = y
			b = x
			c = y
		print(a, b, c)


def fun():
	k = input()
	ar = k.split()
	ar = list(map(int, ar))
	ar.sort()
	if ar[1] == ar[2]:
		print('Yes')
		if ar[1] == ar[0]:
			print(ar[1], ar[1], ar[1])
		else:
			print(ar[1], ar[0], 1)
	else:
		print('No')
k = int(input())
for i in range(k):
	fun()


def c(s):
	for a in s:
		for b in s:
			for c in s:
				if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
					return f'YES\n{a} {b} {c}'
	return 'NO'
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	s = list(set([x, y, z]))
	if len(s) < 3:
		s += [min(x, y, z) - 1]
		print(c(s))
	else:
		print('NO')


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	if lst[0] == lst[1] and lst[0] == lst[2]:
		print('YES')
		print(*lst)
	elif lst.count(max(lst)) == 2:
		print('YES')
		print(max(lst), min(lst), min(lst))
	else:
		print('NO')


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(ar):
	ar.sort()
	b = ar[0]
	c = ar[1]
	if max(b, c) == ar[2]:
		ws('YES')
		wia([1, ar[0], ar[1]])
		return
	ws('NO')

def main():
	for _ in range(ri()):
		ar = ria()
		solve(ar)
main()


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if len(list(set(l))) == 3:
		print('NO')
	elif len(list(set(l))) == 1:
		print('YES')
		print(*l, sep=' ')
	else:
		l.sort()
		if l[1] != l[2]:
			print('NO')
		else:
			print('YES')
			a = l[0]
			b = l[0]
			c = l[2]
			print(a, b, c, sep=' ')


import sys

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

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	(x, y, z) = rinput()
	s = list(set([x, y, z]))
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		ans = s.pop()
		print('YES')
		print(ans, ans, ans)
	else:
		li = [x, y, z]
		li.sort()
		if li[1] != li[2]:
			print('NO')
		else:
			a = li[1]
			b = li[0]
			print('YES')
			print(a, b, b)


test = int(input())
for t in range(test):
	a = list(map(int, input().split()))
	barr = a.copy()
	barr.sort()
	if len(list(set(a))) == 3:
		print('NO')
	else:
		m = max(a)
		if a.count(m) == 2:
			print('YES')
			print(barr[2], barr[0], barr[0])
		elif len(list(set(a))) == 1:
			print('YES')
			print(*a)
		else:
			print('NO')


t = int(input())
while t:
	a = list(map(int, input().split()))
	a.sort()
	if len(set(a)) == 3:
		print('NO')
	elif len(set(a)) == 2 and a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[1])
	elif len(set(a)) == 2 and a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[0])
	t -= 1


t = int(input())
for i in range(t):
	data = list(map(int, input().split()))
	data = sorted(data)
	if data[2] == data[1]:
		print('YES')
		print(data[2], end=' ')
		print(data[0], end=' ')
		print(data[0])
	else:
		print('NO')


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b != c and a > c:
		print('YES')
		print(a, c, 1)
	elif a == c != b and a > b:
		print('YES')
		print(a, b, 1)
	elif b == c != a and b > a:
		print('YES')
		print(b, a, 1)
	else:
		print('NO')


from sys import stdin, stdout

def INPUT():
	return list((int(i) for i in stdin.readline().split()))
import math

def inp():
	return stdin.readline()

def out(x):
	return stdout.write(x)
import math as M
MOD = 10 ** 9 + 7
from random import randint as R
import sys
for _ in range(int(input())):
	(x, y, z) = INPUT()
	bool = True
	A = [x, y, z]
	if x == y == z:
		print('YES')
		print(x, y, z)
	else:
		A.sort()
		if A[1] == A[2]:
			print('YES')
			print(A[0], A[1], A[0])
		else:
			print('NO')


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for i in range(int(input())):
	x = list(map(int, input().split()))
	x.sort(reverse=True)
	if x[0] != x[1]:
		print('NO')
		continue
	print('YES')
	print(x[0], x[2], x[2])


def solver(x, y, z):
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == z and y < x:
		print('YES')
		print(x, y, 1)
	elif y == z and x < y:
		print('YES')
		print(x, 1, z)
	elif x == y and z < x:
		print('YES')
		print(1, y, z)
	else:
		print('NO')
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	solver(x, y, z)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	l.sort()
	if l[1] != l[2]:
		print('NO')
	elif l[0] == l[2]:
		print('YES')
		print(*l)
	else:
		a = l[2]
		b = 1
		c = l[0]
		print('YES')
		print(a, b, c)


n = int(input())
for _ in range(n):
	(a, b, c) = map(int, input().split())
	s = {a, b, c}
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(a, a, a)
	elif sum(s) + max(a, b, c) == a + b + c:
		print('YES')
		for i in s:
			print(i, end=' ')
		print(min(a, b, c))
	else:
		print('NO')


T = int(input())
for case in range(T):
	mmax = sorted(list(map(int, input().split())))
	if mmax[2] != mmax[1]:
		print('NO')
	else:
		print('YES')
		print(mmax[2], mmax[0], mmax[0])


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	(x, y, z) = map(int, input().split())
	(x, y, z) = list(sorted([x, y, z]))
	if y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	n = min(x, y, z)
	if x == m and y == m or (x == m and z == m) or (y == m and z == m):
		print('YES')
		print(m, n, '1')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x >= z or (y == z and z >= x) or (z == x and z >= y):
		print('YES')
		print(max(x, y), end=' ')
		print(min(min(x, y), min(y, z)), end=' ')
		print(1)
	else:
		print('NO')


T = int(input())
for i in range(T):
	lst = list(map(int, input().split()))
	(x, y, z) = (lst[0], lst[1], lst[2])
	lst.sort()
	if lst[1] != lst[2]:
		print('NO')
	else:
		print('YES')
		a = 1
		b = lst[0]
		c = lst[1]
		print(a, b, c)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		arr = ria()
		z = max(arr)
		t = 0
		for i in arr:
			if i == z:
				t += 1
		if t < 2:
			print('NO')
		else:
			print('YES')
			print(min(arr), min(arr), max(arr))
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


import sys
for t in range(int(sys.stdin.readline())):
	(x, y, z) = map(int, sys.stdin.readline().split())
	if len(set((x, y, z))) == 3:
		sys.stdout.write('NO\n')
		continue
	a = sorted((x, y, z))
	if a[1] != a[2]:
		sys.stdout.write('NO\n')
		continue
	sys.stdout.write('YES\n')
	if len(set((x, y, z))) == 1:
		sys.stdout.write(f'{x} {x} {x}\n')
	elif x == a[0]:
		sys.stdout.write(f'{x} {x} {z}\n')
	elif y == a[0]:
		sys.stdout.write(f'{x} {y} {1}\n')
	else:
		sys.stdout.write(f'{x} {z} {z}\n')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
	else:
		arr = [x, y, z]
		arr.sort()
		if arr[0] == arr[1] and arr[1] != arr[2]:
			print('NO')
		else:
			print('YES')
			if x == y == z:
				print(x, y, z, sep=' ')
			else:
				print(min([x, y, z]), min([x, y, z]), max([x, y, z]))


for i in range(int(input())):
	(x, y, z) = sorted(list(map(int, input().split())))
	if y == z:
		print('Yes', str(x) + ' ' + str(z) + ' ' + str(x), sep='\n')
	else:
		print('No')


from sys import stdin
input = stdin.readline
T = int(input())
for case in range(T):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif y == z and x < y:
		print('YES')
		print(x, x, y)
	elif x == y and y > z:
		print('YES')
		print(x, z, z)
	elif x == z and y < z:
		print('YES')
		print(y, y, z)
	else:
		print('NO')


for h in range(int(input())):
	(x, y, z) = map(int, input().strip().split())
	arr = [x, y, z]
	arr.sort(key=lambda x: -x)
	if arr[0] != arr[1]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[2], 1)


from collections import Counter
t = int(input())
for _ in range(t):
	(x, y, z) = list(map(int, input().split()))
	if x == y:
		a = x
		b = z
		c = z
	elif y == z:
		(a, b, c) = (x, x, y)
	elif x == z:
		(a, b, c) = (y, x, y)
	l = [x, y, z]
	d = Counter(l)
	if len(d.keys()) != 3 and d[max(l)] >= 2:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
k = [[] for i in range(t)]
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = b = c = 0
	if max(x, y) == max(y, z) and max(y, z) == max(x, z):
		k[i].append(min(x, y))
		k[i].append(min(y, z))
		k[i].append(min(z, x))
	else:
		k[i].append(-1)
for i in k:
	if i[0] == -1:
		print('NO')
	else:
		print('YES')
		print(*i)


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
sys.setrecursionlimit(10 ** 6)

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def dfs(u, top, adj, vis):
	vis[u] = 1
	for (v, d) in adj[u]:
		if vis[v] == 2 or d == 0:
			continue
		if vis[v] == 1:
			return 'No'
		if dfs(v, top, adj, vis) == 'No':
			return 'No'
	vis[u] = 2
	top.append(u)

def solution(a):
	a.sort()
	if a[-1] == a[-2]:
		return 'YES\n' + f'{a[-1]} {a[0]} {a[0]}'
	return 'NO'

def main():
	T = 1
	T = ri()
	for i in range(T):
		a = ria()
		x = solution(a)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


r = int(input())
for i in range(r):
	l = []
	list = []
	num = input()
	list = [int(x) for x in num.split()]
	a = max(list)
	a1 = min(list)
	b = list.count(a)
	if b < 2:
		print('NO')
	else:
		print('YES')
		if b == 3:
			for i in list:
				print(i, end=' ')
		else:
			if min(list) == list[2]:
				l = [a, a1, 1]
			elif min(list) == list[1]:
				l = [a1, a, 1]
			elif min(list) == list[0]:
				l = [1, a1, a]
			for i in l:
				print(i, end=' ')


t = int(input())
for i in range(t):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	if x == y and y == z:
		print('YES')
		print(x, end=' ')
		print(y, end=' ')
		print(z)
	elif x == y and z > x:
		print('NO')
	elif y == z and x > y:
		print('NO')
	elif x == z and y > z:
		print('NO')
	elif x == y and z < x:
		print('YES')
		print(1, end=' ')
		print(x, end=' ')
		print(z)
	elif y == z and x < y:
		print('YES')
		print(1, end=' ')
		print(z, end=' ')
		print(x)
	elif x == z and y < z:
		print('YES')
		print(1, end=' ')
		print(x, end=' ')
		print(y)
	elif x != y and y != z:
		print('NO')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
arr = []
for _ in range(t):
	arr.append(inlt())
for test in arr:
	(x, y, z) = test
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		continue
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x == y:
		if z > x:
			print('NO')
		else:
			print('YES')
			print(z, z, x)
	if x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(y, y, x)
	if y == z:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(x, x, y)


def three_pairwise(num):
	num = sorted(num)
	if num[2] == num[1]:
		print('YES')
		print('{} {} {}'.format(num[2], num[0], num[0]))
	else:
		print('NO')
n = int(input())
for i in range(n):
	three_pairwise(map(int, input().split()))


t = int(input())
for i in range(t):
	nums = sorted(list(map(int, input().split(' '))))
	if nums[0] == nums[1] == nums[2]:
		print('YES')
		print(nums[0], nums[0], nums[0])
		continue
	elif nums[0] == nums[1]:
		print('NO')
		continue
	elif nums[1] == nums[2]:
		print('YES')
		print(nums[2], nums[0], nums[0])
		continue
	else:
		print('NO')
		continue


import math
t = int(input())
for g in range(t):
	X = list(map(int, input().split()))
	A = set(X)
	if len(A) == 3:
		print('NO')
		continue
	A = list(A)
	A.sort()
	if X.count(A[0]) == 2:
		print('NO')
	else:
		print('YES')
		if len(A) == 1:
			print(A[0], A[0], A[0])
		else:
			print(A[1], A[0], 1)


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	(x, y, z) = list(map(int, stdin.readline().rstrip().split()))
	d = {}
	for i in [x, y, z]:
		if i not in d:
			d[i] = 0
		d[i] += 1
	if len(d) == 1:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	elif len(d) == 3:
		print('NO')
	else:
		mi = min(x, y, z)
		mx = max(x, y, z)
		if d[mi] == 2:
			print('NO')
		elif True:
			print('YES')
			print(str(mi) + ' ' + str(mi) + ' ' + str(mx))
		else:
			print('NO')


import sys
inputlist = sys.stdin.readlines()
number_of_testcases = int(inputlist[0].strip())
for i in range(number_of_testcases):
	numbers_list = list(map(int, inputlist[i + 1].strip().split(' ')))
	numbers_list.sort()
	if numbers_list[1] != numbers_list[2]:
		print('NO')
		continue
	else:
		print('YES')
		print(numbers_list[0], numbers_list[0], numbers_list[1])


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		arr = L()
		if len(list(set(arr))) == 1:
			print('YES')
			print(*arr)
		elif len(list(set(arr))) == 2:
			if arr.count(max(arr)) == 2:
				print('YES')
				print(min(arr), min(arr), max(arr))
			else:
				print('NO')
		else:
			print('NO')
main()


t = int(input())
while t > 0:
	t = t - 1
	a = input()
	A = list(map(int, list(a.split())))
	m = max(A)
	d = {}
	for i in range(3):
		if A[i] in d:
			d[A[i]] = d[A[i]] + 1
		else:
			d[A[i]] = 1
	if d[m] >= 2:
		a = m
		if d[m] == 3:
			b = m
			c = m
		else:
			for i in d:
				if i != m:
					b = i
					c = i
					break
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	else:
		print('NO')


t = int(input())
while t:
	p = sorted(map(int, input().split()))
	if p[-1] == p[-2]:
		print('YES')
		print(p[-1], p[0], p[-0])
	else:
		print('NO')
	t -= 1


import collections

def solve(arr):
	arr.sort()
	if arr[1] == arr[2]:
		print('YES')
		if arr[0] == 1:
			print(arr[0], end=' ')
			print(arr[0], end=' ')
			print(arr[1], end=' ')
		else:
			print(arr[0] - 1, end=' ')
			print(arr[0], end=' ')
			print(arr[1], end=' ')
		print()
	else:
		print('NO')

def main():
	t = int(input())
	while t > 0:
		arr = [int(x) for x in input().split()]
		solve(arr)
		t -= 1
main()


for _ in range(int(input())):
	x = list(map(int, input().split()))
	l = sorted(x)
	if l[0] == l[1] and l[1] == l[2]:
		print('YES')
		print(*l)
	elif len(x) == len(list(set(x))):
		print('NO')
	elif l[0] == l[1] and l[2] > l[0]:
		print('NO')
	elif l[1] == l[2] and l[1] > l[0]:
		print('YES')
		print(max(x), min(x), min(x))


n = int(input())
for _ in range(n):
	a = [int(x) for x in input().split()]
	d = {}
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
	if d[max(a)] > 1:
		print('YES')
		ma = max(a)
		mi = min(a)
		print(mi, mi, ma)
	else:
		print('NO')


import math

def solve():
	l = list(map(int, input().split()))
	l.sort()
	if l[2] == l[1]:
		print('YES')
		print(l[0], l[0], l[2])
	else:
		print('NO')
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
while t > 0:
	l = list(map(int, input().split()))
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		if l[0] == l[1] and l[1] == l[2]:
			for i in l:
				print(i, end=' ')
			print()
		else:
			print(l[1], l[0], l[0])
	t -= 1


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	mx = max(x, max(y, z))
	ct = 0
	mn = 0
	if x == mx:
		ct += 1
	else:
		mn = x
	if y == mx:
		ct += 1
	else:
		mn = y
	if z == mx:
		ct += 1
	else:
		mn = z
	if mn == 0:
		mn = mx
	if ct < 2:
		print('NO')
	else:
		print('YES')
		print(mn, mn, mx)


t = int(input())
while t:
	t -= 1
	a = list(map(int, input().split()))
	b = [0] * 3
	b[0] = a[0]
	b[1] = a[1]
	b[2] = a[2]
	a.sort()
	if a[1] == a[2]:
		print('YES')
		if a[0] == a[1]:
			print(a[0], a[0], a[0])
		elif b[0] < b[1]:
			print(1, b[0], b[1])
		elif b[0] > b[1]:
			print(b[0], b[1], 1)
		else:
			print(b[0], 1, b[2])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	m = sorted([x, y, z])
	a = min(x, y)
	b = min(y, z)
	c = min(x, z)
	n = sorted([max(a, b), max(b, c), max(a, c)])
	if m == n:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


import sys

def isvalid(a, b, c, current):
	if current[0] == max(a, b) and current[1] == max(a, c) and (current[2] == max(b, c)):
		return True
	if current[1] == max(a, b) and current[2] == max(a, c) and (current[0] == max(b, c)):
		return True
	if current[2] == max(a, b) and current[0] == max(a, c) and (current[1] == max(b, c)):
		return True
	return False
info = sys.stdin.readlines()
amount = int(info[0])
data = [list(map(int, info[i].split())) for i in range(1, amount + 1)]
(out1, out2, out3) = ([], [], [])
for i in range(len(data)):
	if data[i].count(max(data[i])) < 2:
		out1.append(i)
	elif data[i].count(max(data[i])) == 2:
		out2.append(i)
	elif data[i].count(max(data[i])) == 3:
		out3.append(i)
sol2 = []
for ind in out2:
	current = data[ind]
	mincontain = min(current)
	maxcontain = max(current)
	for pos in range(1, maxcontain + 1):
		if isvalid(mincontain, pos, maxcontain, current):
			sol2.append([str(mincontain), str(pos), str(maxcontain)])
			break
out = []
for i in range(amount):
	if i in out1:
		out.append('NO')
	elif i in out2:
		to_out = ' '.join(sol2[out2.index(i)])
		out.append('YES\n' + to_out)
	else:
		to_out = out3[out3.index(i)]
		to_out = data[to_out]
		to_out = ' '.join([str(to_out[i]) for i in range(len(to_out))])
		out.append('YES\n' + to_out)
print('\n'.join(out))


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	(x, y, z) = map(int, input().split())
	ma = max(x, y, z)
	if y == x and y == ma or (y == z and z == ma) or (z == x and z == ma):
		print('YES')
		print(1, min(x, y, z), ma)
	else:
		print('NO')

def main():
	for t in range(int(input())):
		solve()
main()


n = int(input())
for i in range(n):
	arr = [int(i) for i in input().split()]
	arr.sort()
	if arr[-1] != arr[-2]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[0], arr[1])


t = int(input())
for x in range(t):
	l = [int(e) for e in input().split()]
	l.sort()
	if l[1] != l[2]:
		print('NO')
		continue
	else:
		print('YES')
		print('{a} {b} {c}'.format(a=l[0], b=l[0], c=l[2]))


import sys
import heapq as hq
from heapq import heappop, heappush
from collections import deque, defaultdict

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def subset_sum_count(arr, n, sum):
	dp = [[0 for _ in range(sum + 1)] for _ in range(n + 1)]
	for i in range(n + 1):
		for j in range(sum + 1):
			if j == 0:
				dp[i][j] = 1
			elif arr[i - 1] <= j:
				dp[i][j] = dp[i - 1][j - arr[i - 1]] + dp[i - 1][j]
			else:
				dp[i][j] = dp[i - 1][j]
	return dp[n][sum]

def prefix(a):
	pre = []
	pre.append(a[0])
	for i in range(1, len(a)):
		pre.append(pre[i - 1] + a[i])
	return pre

def binary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		mi = lo + (hi - lo) / 2
		if func(mi):
			hi = mi
		else:
			lo = mi
	return (lo + hi) / 2

def ternary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		lo_third = lo + (hi - lo) / 3
		hi_third = hi - (hi - lo) / 3
		if func(lo_third) < func(hi_third):
			lo = lo_third
		else:
			hi = hi_third
	return (lo + hi) / 2

def discrete_binary_search(func, lo, hi):
	while lo < hi:
		mi = lo + (hi - lo) // 2
		if func(mi):
			hi = mi
		else:
			lo = mi + 1
	return lo

def discrete_ternary_search(func, lo, hi):
	while lo <= hi:
		lo_third = lo + (hi - lo) // 3
		hi_third = lo + (hi - lo) // 3 + (1 if 0 < hi - lo < 3 else (hi - lo) // 3)
		if func(lo_third) < func(hi_third):
			lo = lo_third + 1
		else:
			hi = hi_third - 1
	return lo

def right_rotate(a, s):
	return a[s:] + a[:s]

def dec_to_bin(x):
	return int(bin(x)[2:])

def str_to_integer_list(n):
	a = []
	for i in range(len(n)):
		a.append(int(n[i]))
	return a

def list_to_str(l):
	s = ''
	for i in l:
		s += str(i)
	return s

def dijkstra(s, N, E):
	visited = set()
	dist = {}
	for i in range(1, N + 1):
		dist[i] = 1 << 29
	queue = [(dist[i], i) for i in range(1, N + 1)]
	hq.heappush(queue, (0, s))
	dist[s] = 0
	while queue:
		(d, u) = hq.heappop(queue)
		if u in visited:
			continue
		for t in E[u]:
			(v, r) = t
			if dist[v] > d + r:
				dist[v] = d + r
				hq.heappush(queue, (dist[v], v))
		visited.add(u)
	return dist

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def dijkstra(n, graph, start):
	(dist, parents) = ([float('inf')] * n, [-1] * n)
	dist[start] = 0
	queue = [(0, start)]
	while queue:
		(path_len, v) = heappop(queue)
		if path_len == dist[v]:
			for (w, edge_len) in graph[v]:
				if edge_len + path_len < dist[w]:
					(dist[w], parents[w]) = (edge_len + path_len, v)
					heappush(queue, (edge_len + path_len, w))
	return (dist, parents)

def path(start, end, parent):
	path = [end]
	while path[-1] != start:
		path.append(parent[path[-1]])
	path.reverse()
	return path

def bfs(graph, start, goal):
	if start == goal:
		return [start]
	visited = {start}
	queue = deque([(start, [])])
	while queue:
		(current, path) = queue.popleft()
		visited.add(current)
		for neighbor in graph[current]:
			if neighbor == goal:
				return path + [current, neighbor]
			if neighbor in visited:
				continue
			queue.append((neighbor, path + [current]))
			visited.add(neighbor)
	return None
import os
import sys
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		(x, y, z) = invr()
		l = []
		l.append(x)
		l.append(y)
		l.append(z)
		l.sort(reverse=True)
		if x == y == z:
			print('YES')
			print(x, x, x)
		elif l[0] == l[1] != l[2]:
			print('YES')
			print(l[0], l[2], 1)
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
t = ip()
for _ in range(t):
	(x, y, z) = inp()
	if len(set([x, y, z])) == 3:
		print('NO')
	else:
		ch = max(x, y, z)
		arr = [x, y, z]
		ct = 0
		for i in arr:
			if i == ch:
				ct += 1
		if ct == 1:
			print('NO')
		else:
			print('YES')
			print(min(arr), min(arr), ch)


for _ in range(int(input())):
	(a, b, c) = sorted(map(int, input().split()))
	print('NO') if b != c else print('YES', '\n', a, a, c)


import sys

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

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

def mints():
	return 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()


from sys import stdin, stdout

def input():
	return stdin.readline().strip()

def solve():
	(x, y, z) = map(int, input().split())
	us = x == y and y == z
	if us:
		print('YES')
		print(f'{x} {x} {x}')
		return 0
	us1 = x < y and y == z
	us2 = y < x and x == z
	us3 = z < x and x == y
	if us1 or us2 or us3:
		print('YES')
		if x < y:
			print(f'{x} {x} {y}')
		elif y < x:
			print(f'{y} {x} {y}')
		else:
			print(f'{x} {z} {z}')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if len(set(l)) == 1:
		print('YES')
		print(*l)
	elif len(set(l)) == 2:
		for i in set(l):
			if l.count(i) == 2:
				p = i
				break
		if p == max(l):
			print('YES')
			if min(set(l)) - 1 <= 0:
				print(*set(l), 1)
			else:
				l.append(min(set(l)) - 1)
				print(*set(l))
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	if l.count(max(l)) < 2:
		print('NO')
	else:
		print('YES')
		mi = min(l)
		mx = max(l)
		idx = l.index(mi)
		if idx == 0:
			print(mi, mi, mx)
		elif idx == 1:
			print(mx, mi, mi)
		else:
			print(mi, mx, mi)


for i in range(int(input())):
	a = [int(x) for x in input().split()]
	a.sort()
	if a[1] == a[2]:
		print('YES')
		print(str(1) + ' ' + str(a[0]) + ' ' + str(a[2]))
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter

def main():
	for _ in range(int(input())):
		(a, b, c) = map(int, input().split())
		(a, b, c) = sorted([a, b, c])
		if c != b:
			print('NO')
		else:
			print('YES')
			print(a, a, c)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


testcases = int(input())
for _ in range(testcases):
	input_values = [int(i) for i in input().split(' ')]
	x = input_values[0]
	y = input_values[1]
	z = input_values[2]
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y == z:
		print('YES')
		print(x, y, z, sep=' ')
	elif x == y:
		if x == max(x, z):
			print('YES')
			print(x, z, 1, sep=' ')
		else:
			print('NO')
	elif x == z:
		if x == max(x, y):
			print('YES')
			print(x, y, 1, sep=' ')
		else:
			print('NO')
	elif y == max(y, x):
		print('YES')
		print(y, x, 1, sep=' ')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(list(set([x, y, z]))) == 1:
		print('YES')
		print(x, y, z)
	elif len(list(set([x, y, z]))) == 3:
		print('NO')
	elif x == y:
		if z > x:
			print('NO')
		else:
			print('YES')
			print(x, z, z)
	elif y == z:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(x, x, z)
	elif y > x:
		print('NO')
	else:
		print('YES')
		print(x, y, y)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	L = []
	L.append(x)
	L.append(y)
	L.append(z)
	m = max(L)
	L1 = []
	if L.count(m) < 2:
		print('NO')
	elif L.count(m) == 3:
		print('YES')
		print(x, y, z)
	else:
		if x == m and y == m:
			a = m
			b = min(L)
			c = x // m
		elif y == m and z == m:
			c = m
			a = min(L)
			b = y // m
		elif x == m and z == m:
			b = m
			a = min(L)
			c = x // m
		print('YES')
		print(a, b, c)


tCases = int(input())
for _ in range(tCases):
	a1 = list(map(int, input().split()))
	maxele = max(a1)
	nDict = {}
	for i in a1:
		if i in nDict:
			nDict[i] += 1
		else:
			nDict.update({i: 1})
	a = {k: v for (k, v) in sorted(nDict.items(), key=lambda item: item[1], reverse=True)}
	flag = -1
	tempList = []
	count = 0
	flag1 = 0
	for i in a:
		tempList.append(i)
		if i == 1:
			flag1 = 1
	for i in a:
		if a[i] > 2 and count == 0 and (maxele == i):
			flag = 2
		elif a[i] == 2 and count == 0 and (maxele == i):
			flag = 1
		count += 1
	if flag == 1 and flag1 == 0:
		print('YES')
		for i in tempList:
			print(i, end=' ')
		print(tempList[len(tempList) - 1] - 1)
	elif flag == 1 and flag1 == 1:
		print('YES')
		for i in tempList:
			print(i, end=' ')
		print(tempList[1])
	elif flag == 2:
		print('YES')
		print(tempList[0], tempList[0], tempList[0])
	else:
		print('NO')


def solve(a, b, c, d):
	big = float('inf')
	small = float('-inf')
	sets = set(d)
	if len(sets) == 3:
		print('NO')
	elif len(sets) == 2 and a == b:
		print('NO')
	else:
		print('YES')
		print(a, a, b)

def main():
	t = int(input())
	for i in range(t):
		d = input()
		d = [int(i) for i in d.split()]
		d.sort()
		a = d[0]
		b = d[1]
		c = d[2]
		ans = solve(a, b, c, d)
main()


for _ in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	maxx = max(x, y, z)
	minn = min(x, y, z)
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	else:
		mincount = 0
		maxcount = 0
		for el in [x, y, z]:
			if el == maxx:
				maxcount += 1
			if el == minn:
				mincount += 1
		if maxcount == 2 and mincount == 1:
			print('YES')
			print(maxx, minn, minn)
		else:
			print('NO')


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	M = max(x, y, z)
	if x == y == M or y == z == M or z == x == M:
		print('YES')
		print(M, min(x, y, z), 1)
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline()
exec("try:sys.stdin=open('in.txt','r');sys.stdout=open('out.txt','w')\nexcept:pass")
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if max(x, y) == z or max(y, z) == x or max(z, x) == y:
		print('YES')
		print(min(x, y, z), max(x, y, z), min(x, y, z))
	else:
		print('NO')


t = int(input(''))
for test in range(t):
	k = list()
	a = input('')
	a = a.split()
	for el in a:
		k.append(int(el))
	k.sort()
	if k[2] == k[1]:
		print('YES')
		print(k[0], k[0], k[1])
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	(x, y, z) = sorted(list(map(int, input().split())))
	c = y
	b = x
	if y != z:
		print('NO')
		continue
	else:
		print('YES')
		print(b, b, c)


def died(s):
	s.sort()
	if s[1] == s[2]:
		return False
	return True

def again(x, y, z):
	if z <= x and z <= y:
		print(x, z, z)
	elif y <= x and y <= z:
		print(y, x, y)
	elif x <= y and x <= z:
		print(x, x, y)
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if died([x, y, z]):
		print('NO')
	else:
		print('YES')
		again(x, y, z)


import itertools

def main():
	(x, y, z) = map(int, input().split(' '))
	for (a, b, c) in itertools.permutations((x, y, z, min(x, y, z)), 3):
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
			return
	print('NO')
	return
for _ in range(int(input())):
	main()


from collections import Counter
t = int(input())
for i in range(t):
	s = input().split()
	x = int(s[0])
	y = int(s[1])
	z = int(s[2])
	if x == y and x == z:
		(print('YES'),)
		(print(x, x, x),)
	elif len(Counter(s).keys()) == 2:
		if x == y and x > z:
			(print('YES'),)
			if z == 1:
				(print(x, z, z),)
			else:
				(print(x, z, z - 1),)
		elif y == z and y > x:
			(print('YES'),)
			if x == 1:
				(print(y, x, x),)
			else:
				(print(y, x, x - 1),)
		elif x == z and x > y:
			(print('YES'),)
			if y == 1:
				(print(x, y, y),)
			else:
				(print(x, y, y - 1),)
		else:
			(print('NO'),)
	else:
		(print('NO'),)


import statistics
from statistics import mode
for t in range(int(input())):
	arr = list(map(int, input().split()))
	if len(arr) == len(set(arr)):
		print('NO')
	elif len(set(arr)) == 1:
		print('YES')
		print(*arr)
	else:
		number = mode(arr)
		for i in range(3):
			if arr[i] != number:
				n2 = arr[i]
		if number < n2:
			print('NO')
		else:
			print('YES')
			print(str(n2) + ' ' + str(n2) + ' ' + str(number))


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)


import math
num_cases = int(input())
for _ in range(num_cases):
	arr = list(map(int, input().strip().split()))
	arr.sort(reverse=True)
	if arr[0] != arr[1]:
		print('NO')
	else:
		print('YES')
		print('%d %d %d' % (arr[0], arr[2], arr[2]))


def solve():
	l = list(map(int, input().split()))
	if l[0] == l[1] and l[0] == l[2]:
		print('YES')
		print(*l)
	elif l.count(max(l)) == 2:
		print('YES')
		x = list(set(l))
		print(1, *x)
	else:
		print('NO')
for _ in range(int(input())):
	solve()


t = int(input())
for i in range(t):
	xyz = list(map(int, input().split()))
	x = xyz[0]
	y = xyz[1]
	z = xyz[2]
	if x - y != 0 and y - z != 0 and (x - z != 0):
		print('NO')
	elif x == y:
		if x < z:
			print('NO')
		else:
			print('YES')
			print(x, z, z)
	elif y == z:
		if y < x:
			print('NO')
		else:
			print('YES')
			print(z, x, x)
	elif z == x:
		if z < y:
			print('NO')
		else:
			print('YES')
			print(z, y, y)


for _ in range(int(input())):
	l = list(map(int, input().split(' ')))
	x = l[0]
	y = l[1]
	z = l[2]
	(a, b, c) = (x, 0, 0)
	isValid = 1
	if y == a:
		if z > a:
			isValid = 0
		else:
			isValid = 1
			if z == a:
				b = a
				c = a
			else:
				b = z
				c = z
	elif y > a:
		c = y
		if z == c:
			isValid = 1
			b = a
		else:
			isValid = 0
	else:
		isValid = 0
	if isValid == 0:
		(a, b, c) = (0, x, 0)
		if z == b:
			if y > b:
				isValid = 0
			else:
				isValid = 1
				if y == b:
					a = b
					c = b
				else:
					a = y
					c = y
		elif z > b:
			c = z
			if y == c:
				isValid = 1
				a = b
			else:
				isValid = 0
	if isValid == 1:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


rr = lambda : input()
rri = lambda : int(input())
rrm = lambda : list(map(int, input().split()))
INF = float('inf')

def solve(x, y, z):
	vals = [x, y, z]
	for i in range(3):
		x = vals[i % 3]
		y = vals[(i + 1) % 3]
		z = vals[(i + 2) % 3]
		a = x
		c = y
		b = a
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
			return
	print('NO')
n = rri()
for _ in range(n):
	(x, y, z) = rrm()
	solve(x, y, z)


for i in range(int(input())):
	(a, b, c) = sorted(map(int, input().split()))
	if b == c:
		print('YES')
		print(a, a, c)
	else:
		print('NO')


t = int(input())
while t > 0:
	arr = input().split()
	arr = [int(i) for i in arr]
	if arr.count(max(arr)) >= 2:
		print('YES')
		temp = [min(arr), min(arr), max(arr)]
		print(*temp, sep=' ')
	else:
		print('NO')
	t -= 1


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')


t = int(input())
for i in range(t):
	ar = [int(i) for i in input().split()]
	f = ar.count(max(ar))
	if f >= 2:
		print('YES')
		print(str(max(ar)) + ' ' + str(min(ar)) + ' ' + str(min(ar)))
	else:
		print('NO')


GI = lambda : int(input())
GIS = lambda : map(int, input().split())
LGIS = lambda : list(GIS())

def main():
	for t in range(GI()):
		l = LGIS()
		l.sort(reverse=True)
		if l[0] != l[1]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[2], l[2])
main()


total = int(input())
while total:
	(a, b, c) = map(int, input().split())
	if a == b and a >= c:
		print('YES')
		print(a, c, c)
	elif a == c and a >= b:
		print('YES')
		print(a, b, b)
	elif b == c and b > a:
		print('YES')
		print(b, a, a)
	else:
		print('NO')
	total = total - 1


t = input()
for _ in range(int(t)):
	(x, y, z) = map(int, input().split())
	if len({x, y, z}) == 3 or [x, y, z].count(min({x, y, z})) == 2:
		print('NO')
	else:
		print('YES')
		print(1, min({x, y, z}), max({x, y, z}))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	ans = 'YES'
	l = [x, y, z]
	m = max(l)
	if x == y and y == z:
		(a, b, c) = (x, x, x)
	elif x != y and y != z and (x != z):
		ans = 'NO'
	elif l.count(m) == 1:
		ans = 'NO'
	else:
		if x == m and y == m:
			(a, b, c) = (m, z, z)
		elif z == m and y == m:
			(a, b, c) = (x, x, m)
		if x == m and z == m:
			(a, b, c) = (y, m, y)
	print(ans)
	if ans == 'YES':
		print(a, b, c)


for iota in range(int(input())):
	num = list(map(int, input().split()))
	if num[1] == num[2] == num[0]:
		print('YES')
		print(num[0], num[0], num[0])
	elif num[0] == num[1]:
		if num[0] < num[2]:
			print('NO')
		else:
			print('YES')
			print(num[0], num[2], num[2])
	elif num[2] == num[1]:
		if num[2] < num[0]:
			print('NO')
		else:
			print('YES')
			print(num[2], num[0], num[0])
	elif num[0] == num[2]:
		if num[0] < num[1]:
			print('NO')
		else:
			print('YES')
			print(num[0], num[1], num[1])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = sorted(map(int, input().split()))
	if x == y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y and y < z:
		print('NO')
		continue
	if x < y and y == z:
		print('YES')
		print(x, x, z)
		continue
	print('NO')


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	num1 = value()
	num = sorted(num1)
	if len(set(num)) == 3:
		print('NO')
		continue
	if len(set(num)) == 1:
		print('YES')
		print(num[0], num[0], num[0])
		continue
	if num[0] == num[1]:
		print('NO')
	else:
		print('YES')
		print(num[0], num[0], num[1])


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	(x, y, z) = list(map(int, input().split()))
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		return
	if x == y and x > z:
		print('YES')
		print(x, z, z)
		return
	if x == z and x > y:
		print('YES')
		print(x, y, y)
		return
	if y == z and y > x:
		print('YES')
		print(y, x, x)
		return
	print('NO')
main()


import sys
input = sys.stdin.readline

def main():
	xyz = list(map(int, input().split()))
	max_ = max(xyz)
	if xyz.count(max_) == 1:
		print('NO')
		return
	print('YES')
	min_ = min(xyz)
	print(max_, min_, min_)
for _ in range(int(input())):
	main()


def tc():
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		return
	a = [x, y, z]
	a.sort()
	if a[0] == a[1]:
		print('NO')
		return
	elif a[0] != a[1] and a[1] != a[2]:
		print('NO')
		return
	else:
		print('YES')
		print(a[1], a[0], 1)
T = int(input())
for _ in range(T):
	tc()


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		a = LI()
		t = sorted(a)
		if t[1] == t[2]:
			rr.append('YES')
			if a[0] == t[0]:
				rr.append(JA([t[0], t[0], t[1]], ' '))
			elif a[1] == t[0]:
				rr.append(JA([t[0], t[1], t[0]], ' '))
			else:
				rr.append(JA([t[1], t[0], t[0]], ' '))
		else:
			rr.append('NO')
	return JA(rr, '\n')
print(main())


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
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')


for _ 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 solve():
	(x, y, z) = map(int, input().split())
	if x == y:
		a = x
		if z > a:
			print('NO')
			return
		b = c = z
	elif y == z:
		c = y
		if x > c:
			print('NO')
			return
		a = b = x
	elif x == z:
		b = x
		if y > b:
			print('NO')
			return
		a = c = y
	else:
		print('NO')
		return
	print('YES')
	print(a, b, c)
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
while t:
	t -= 1
	ans = 0
	(x, y, z) = map(int, input().split())
	if x >= y and x == z:
		b = x
		a = y
		c = y
		print('YES')
		print('%d %d %d' % (a, b, c))
		continue
	if y >= x and y == z:
		c = y
		a = x
		b = x
		print('YES')
		print('%d %d %d' % (a, b, c))
		continue
	if x == y and x >= z:
		a = x
		b = z
		c = z
		print('YES')
		print('%d %d %d' % (a, b, c))
		continue
	print('NO')


def main():
	t = int(input())
	for case in range(t):
		vals = [int(x) for x in input().split()]
		vals = sorted(vals)
		if vals[1] != vals[2]:
			print('NO')
		else:
			b = vals[2]
			a = vals[0]
			c = vals[0]
			print('Yes')
			print(a, b, c)
main()


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


t = int(input())
for i in range(0, t):
	ls = list(map(int, input().split()))
	ls.sort(reverse=True)
	if ls[0] == ls[1]:
		print('YES')
		print(ls[0], end=' ')
		print(ls[2], end=' ')
		print(ls[2])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split(' '))
	l = [x, y, z]
	if len(set(l)) == 2:
		k = max(l)
		if l.count(k) == 2:
			print('YES')
			l.remove(k)
			l.remove(k)
			if l[0] > 1:
				print(k, l[0], l[0] - 1)
			else:
				print(k, l[0], l[0])
		else:
			print('NO')
	elif len(set(l)) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	else:
		l = [x, y, z]
		m = max(l)
		mi = min(l)
		if l.count(m) >= 2:
			print('YES')
			i = l.index(mi)
			l1 = [0, 0, 0]
			l1[i] = mi
			l1[(i + 1) % 3] = mi
			l1[(i + 2) % 3] = m
			print(*l1)
		else:
			print('NO')


for _ in range(int(input())):
	xyz = [int(x) for x in input().split()]
	maxV = max(xyz)
	minV = min(xyz)
	c = xyz.count(maxV)
	if c == 3:
		print('YES')
		print(f'{maxV} {maxV} {maxV}')
	elif c == 2:
		print('YES')
		print(f'{maxV} {minV} {minV}')
	else:
		print('NO')


def main():
	T = int(input())
	while T:
		xyz = list(map(int, input().split()))
		xyz.sort(reverse=True)
		if xyz[0] == xyz[1] == xyz[2]:
			print('YES')
			print(xyz[0], xyz[1], xyz[2])
		elif xyz[0] == xyz[1]:
			print('YES')
			print(xyz[0], xyz[2], 1)
		else:
			print('NO')
		T -= 1
main()


t = int(input())
for _ in range(t):
	r = list(map(int, input().split()))
	r.sort(reverse=True)
	if len(list(set(r))) == 3:
		print('NO')
	elif r[0] > r[1] and r[1] == r[2]:
		print('NO')
	else:
		print('YES')
		print(r[0], r[2], 1)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	a1 = 1
	a2 = x
	b1 = x
	b2 = 1
	c1 = y
	c2 = z
	if x == max(a1, b1) and y == max(a1, c1) and (z == max(b1, c1)):
		print('YES')
		print(a1, b1, c1)
	elif x == max(a2, b2) and y == max(a2, c2) and (z == max(b2, c2)):
		print('YES')
		print(a2, b2, c2)
	else:
		print('NO')


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right

def solve():
	a = list(map(int, stdin.readline().split()))
	temp = a[:]
	temp.sort()
	if len(set(a)) == 3:
		print('NO')
		return
	if temp[1] != temp[2]:
		print('NO')
	else:
		if a[0] == a[1]:
			aa = a[0]
			b = a[2]
			c = 1
		elif a[1] == a[2]:
			c = a[1]
			b = a[0]
			aa = 1
		else:
			b = a[0]
			aa = a[1]
			c = 1
		print('YES')
		print(aa, b, c)
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(*[x, y, z], sep=' ')
	elif x != y and y != z and (x != z):
		print('NO')
	elif x == y and z > y:
		print('NO')
	elif x == y and z < y:
		print('YES')
		print(*[x, z, z], sep=' ')
	elif x > y and y == z:
		print('NO')
	elif y == z and x < y:
		print('YES')
		print(*[x, x, z], sep=' ')
	elif x == z and y > z:
		print('NO')
	elif x == z and y < z:
		print('YES')
		print(*[y, x, y], sep=' ')


try:
	t = int(input())
	while t != 0:
		(x, y, z) = map(int, input().split())
		p = max(x, y, z)
		count = 0
		if x == p:
			count = count + 1
		if y == p:
			count = count + 1
		if z == p:
			count = count + 1
		if count > 1:
			print('YES')
			if count == 3:
				print(p, p, p, sep=' ')
			else:
				need = 0
				if x != p:
					need = x
				elif y != p:
					need = y
				else:
					need = z
				print(p, need, need, sep=' ')
		else:
			print('NO')
		t = t - 1
except EOFError:
	print(' ')


import math
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a != b and b != c and (c != a):
		print('NO')
	elif a == b and b == c and (c == a):
		print('YES')
		print(a, b, c)
	elif a == b:
		if c > a:
			print('NO')
		else:
			print('YES')
			print(a, c, c)
	elif b == c:
		if a > b:
			print('NO')
		else:
			print('YES')
			print(a, a, b)
	elif b > a:
		print('NO')
	else:
		print('YES')
		print(b, a, b)


def solve():
	(x, y, z) = [int(i) for i in input().split()]
	pole = []
	pole.append(x)
	pole.append(y)
	pole.append(z)
	maxi = max(pole)
	mini = min(pole)
	if x != y and x != z and (z != y):
		print('NO')
	elif x == y and x == z and (z == y):
		print('YES')
		print(x, y, z)
	elif pole.count(mini) == 2:
		print('NO')
	else:
		print('YES')
		print(maxi, mini, mini)
t = int(input())
for i in range(t):
	solve()


t = int(input())
for case in range(t):
	List = [int(j) for j in input().split(' ')]
	List.sort()
	if List[1] == List[2]:
		print('YES')
		print('1', end=' ')
		print(List[0], end=' ')
		print(List[1])
	else:
		print('NO')


t = int(input())
for k in range(t):
	n = list(map(int, input().split()))
	n.sort()
	if n[0] == n[1] and n[1] == n[2]:
		print('YES')
		print(n[0], n[1], n[2])
	elif n[1] == n[2]:
		print('YES')
		print(n[0], n[0], n[1])
	else:
		print('NO')


size = int(input())

def selection_sort(n):
	for i in range(len(ls) - 1):
		min_ind = i
		for j in range(i + 1, len(ls)):
			if ls[min_ind] > ls[j]:
				min_ind = j
		temp = ls[min_ind]
		ls[min_ind] = ls[i]
		ls[i] = temp
for i in range(size):
	ls = list(map(int, input().split()))
	if ls[0] == ls[1] or ls[0] == ls[2] or ls[1] == ls[2]:
		if ls[0] == ls[1] == ls[2]:
			print('YES')
			for i in range(3):
				print(ls[i], end=' ')
			print()
		else:
			selection_sort(ls)
			if ls[0] == ls[1] and ls[0] < ls[2]:
				print('NO')
			else:
				print('YES')
				print(ls[0], 1, ls[2])
	else:
		print('NO')


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(x, y, z) = int_array()
	k = [x, y, z]
	if len(set(k)) == 1:
		print('YES')
		print(x, y, z)
	elif len(set(k)) == 3:
		print('NO')
	elif k.count(max(k)) == 2:
		print('YES')
		ans = [1, min(k), max(k)]
		print(*ans)
	else:
		print('NO')


t = int(input())
for i in range(t):
	xyz = sorted(tuple(map(int, input().split())))
	if all((j == xyz[0] for j in xyz)):
		print('YES\n' + str(xyz[0]), xyz[1], xyz[2])
	elif xyz[1] == xyz[2]:
		print('YES\n' + '1', xyz[0], xyz[2])
	else:
		print('NO')


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == z and x > y:
		print('YES')
		print(x, y, y)
	elif y == z and y > x:
		print('YES')
		print(x, x, y)
	elif x == y and x > z:
		print('YES')
		print(x, z, z)
	else:
		print('NO')


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x + y + z != 2 * max(x, y, z) + min(x, y, z):
		print('NO')
	else:
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))


import sys, math
mod = 10 ** 9 + 7
md = 998244353
input = lambda : sys.stdin.readline().strip()
inp = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	(a, b, c) = inp()
	t = max(a, b, c)
	d = [a, b, c]
	if d.count(t) > 1:
		print('YES')
		ind = d.index(min(d))
		ans = [t, t, t]
		ans[ind] = min(d)
		ans[(ind + 1) % 3] = 1 if d.count(t) == 2 else t
		print(*ans)
	else:
		print('NO')


def foo():
	l = list(map(int, input().split()))
	c = max(l)
	g = [c - l[0], c - l[1], c - l[2]]
	if g.count(0) < 2:
		print('NO')
	else:
		k = sorted(list(set(l)))
		if len(k) == 1:
			print('YES')
			print(*l)
		else:
			print('YES')
			print(k[1], k[0], k[0])
for _ in range(int(input())):
	foo()


t = int(input())
for _ in range(t):
	l1 = [int(x) for x in input().split()]
	l1.sort()
	(x, y, z) = (l1[0], l1[1], l1[2])
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y and y < z:
		print('NO')
	elif x <= y and y == z:
		print('YES')
		print(z, x, 1)
	elif x < y and y < z:
		print('NO')


T = int(input())
while T > 0:
	T = T - 1
	A = [int(i) for i in input().split()]
	A.sort()
	if A[1] == A[2]:
		print('YES')
		print(A[2], A[0], A[0])
	else:
		print('NO')


def pair_max(arr):
	m = max(arr)
	if arr.count(m) >= 2:
		l = [min(arr), min(arr), m]
	else:
		l = []
	return l
t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	result = pair_max(arr)
	if result:
		print('YES')
		print(*result, sep=' ')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().strip(' ').split())
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	else:
		a = max((x, y, z))
		b = min((x, y, z))
		if (x, y, z).count(a) == 2:
			print('YES')
			print(str(b) + ' ' + str(b) + ' ' + str(a))
		else:
			print('NO')


t = int(input())
maxs_ar = []
for i in range(t):
	xyz = []
	(x, y, z) = map(int, input().split())
	xyz.append(x)
	xyz.append(y)
	xyz.append(z)
	maxs_ar.append(xyz)

def find_maximumi(maxs_ar):
	ans = []
	for maxs in maxs_ar:
		maxs_ans = []
		(a, b, c) = (1, 1, 1)
		maxs.sort()
		(x, y, z) = (maxs[0], maxs[1], maxs[2])
		if y != z:
			maxs_ans.append('NO')
		else:
			b = x
			c = y
			if x == y:
				a = x
			maxs_ans.append('YES')
			maxs_ans.append(a)
			maxs_ans.append(b)
			maxs_ans.append(c)
		ans.append(maxs_ans)
	return ans
maxs_ans = find_maximumi(maxs_ar)
for ans in maxs_ans:
	if ans[0] == 'YES':
		print('YES')
		print(ans[1], ans[2], ans[3])
	else:
		print('NO')


T = int(input())
while T > 0:
	(a, b, c) = map(int, input().split())
	x = 0
	y = 0
	z = 0
	if a != b and b != c and (a != c):
		print('NO')
	elif a == b and a >= c:
		x = a
		y = c
		z = c
		print('YES')
		print(x, y, z)
	elif a == c and a >= b:
		x = a
		y = b
		z = b
		print('YES')
		print(x, y, z)
	elif b == c and c >= a:
		x = b
		y = a
		z = a
		print('YES')
		print(x, y, z)
	else:
		print('NO')
	T -= 1


def cons_check(a, b, c, lis):
	flag = 0
	if lis[0] == max(a, b):
		flag += 1
	if lis[1] == max(a, c):
		flag += 1
	if lis[2] == max(b, c):
		flag += 1
	return flag
for test in range(int(input())):
	lis = list(map(int, input().split()))
	c = 0
	for i in lis:
		for j in lis:
			for k in lis:
				if cons_check(i, j, k, lis) == 3:
					print('YES')
					print(i, j, k)
					c = 1
					break
			if c == 1:
				break
		if c == 1:
			break
	if c == 0:
		print('NO')


for i in range(int(input())):
	arr = list(map(int, input().split()))
	a = max(arr)
	if arr.count(a) < 2:
		print('NO')
	else:
		ans = []
		ans.append(a)
		ans.append(min(arr))
		ans.append(min(arr))
		print('YES')
		print(*ans)


import sys
from itertools import product

def readlines(type=int):
	return list(map(type, sys.stdin.readline().split()))

def read(type=int):
	return type(sys.stdin.readline().strip())
joint = lambda it, sep=' ': sep.join([str(i) if type(i) != list else sep.join(map(str, i)) for i in it])

def solve(nums):
	(x, y, z) = nums
	for (a, b, c) in product(nums, repeat=3):
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			return 'YES\n{} {} {}'.format(a, b, c)
	return 'NO'

def main():
	n = read()
	solutions = []
	for _ in range(n):
		solutions.append(solve(readlines()))
	print(joint(solutions, '\n'))
main()


I = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	(x, y, z) = I()
	distinct = len(set([x, y, z]))
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif distinct == 2 and [x, y, z].count(max(x, y, z)) == 2:
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))
	else:
		print('NO')


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	(x, y, z) = map(int, input().split())
	arr = [x, y, z]
	arr.sort()
	if arr[1] ^ arr[2]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[0], arr[1])


def maths(m, n, o):
	if len({m, n, o}) == 3:
		print('NO')
	elif m == n == o:
		a = b = c = m
		print('YES')
		print(a, b, c)
	elif m == o:
		b = m
		if n > b:
			print('NO')
		else:
			a = n
			if a - 1 < 1:
				c = a
			else:
				c = a - 1
			print('YES')
			print(a, b, c)
	elif m == n:
		a = m
		if o > a:
			print('NO')
		else:
			b = o
			if b - 1 < 1:
				c = b
			else:
				c = b - 1
			print('YES')
			print(a, b, c)
	elif n == o:
		c = n
		if m > c:
			print('NO')
		else:
			a = m
			if a - 1 < 1:
				b = a
			else:
				b = a - 1
			print('YES')
			print(a, b, c)
testCases = int(input())
x_s = []
y_s = []
z_s = []
for _ in range(testCases):
	(x, y, z) = map(int, input().split())
	x_s.append(x)
	y_s.append(y)
	z_s.append(z)
for i in range(testCases):
	maths(x_s[i], y_s[i], z_s[i])


for _ in range(int(input())):
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	if l[0] == l[1] and l[1] == l[2]:
		print('YES')
		print(l[0], l[1], l[2])
	elif l[0] == l[1] and l[1] != l[2]:
		print('YES')
		print(l[0], l[2], l[2])
	else:
		print('NO')


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def calculate_sum(a, N):
	m = N / a
	sum = m * (m + 1) / 2
	ans = a * sum
	return ans

def series(N):
	return N * (N + 1) // 2

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def LCM(x, y):
	return x * y // GCD(x, y)

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def isprime(n):
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	x = lin()
	x = sorted(x)
	if x[1] == x[2]:
		print('YES')
		print(x[0], x[0], x[1])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	mm = max(x, y, z)
	mi = min(x, y, z)
	if mm == mi:
		print('YES')
		print(x, y, z)
	elif x != y and x != z and (y != z):
		print('NO')
	elif [x, y, z].count(mm) > [x, y, z].count(mi):
		print('YES')
		print(mm, mi, mi)
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = input().split()
	x = int(a[0])
	y = int(a[1])
	z = int(a[2])
	if x != y and x != z and (y != z):
		print('NO')
		continue
	if x == y == z:
		print('YES' + '\n' + str(x) + ' ' + str(y) + ' ' + str(z))
		continue
	if x == y and x > z:
		print('YES' + '\n' + str(x) + ' ' + str(z) + ' ' + str(z))
		continue
	if x == z and x > y:
		print('YES' + '\n' + str(x) + ' ' + str(y) + ' ' + str(y))
		continue
	if z == y and z > x:
		print('YES' + '\n' + str(z) + ' ' + str(x) + ' ' + str(x))
		continue
	print('NO')


t = int(input())
for q in range(t):
	li = list(map(int, input().split()))
	li.sort()
	if li[1] != li[2]:
		print('NO')
	else:
		print('YES')
		print(li[0], li[0], li[1])


for i in range(int(input())):
	a = list(map(int, input().split()))
	x = a[0]
	y = a[1]
	z = a[2]
	a.sort()
	if x != y and x != z and (y != z):
		print('NO')
	elif a[0] == a[1] and a[0] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[2])


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	l = li()
	if l[0] == l[1] and l[0] == l[2]:
		print('YES')
		print(*l)
	elif l.count(max(l)) == 2:
		print('YES')
		x = list(set(l))
		print(1, *x)
	else:
		print('NO')
for _ in range(inp()):
	solve()


t = int(input())
while t:
	t -= 1
	arr = list(map(int, input().split()))
	if arr[0] != arr[1] and arr[1] != arr[2] and (arr[0] != arr[2]):
		print('NO')
		continue
	if arr[0] == arr[1] and arr[1] == arr[2]:
		print('YES')
		k = arr[0]
		print(str(k) + ' ' + str(k) + ' ' + str(k))
		continue
	if arr[0] == arr[1]:
		k = arr[0]
		if max(arr) == k:
			print('YES')
			print(str(k) + ' ' + str(min(arr)) + ' ' + str(min(arr)))
			continue
		else:
			print('NO')
			continue
	if arr[1] == arr[2]:
		k = arr[1]
		if max(arr) == k:
			print('YES')
			print(str(k) + ' ' + str(min(arr)) + ' ' + str(min(arr)))
			continue
		else:
			print('NO')
			continue
	if arr[0] == arr[2]:
		k = arr[0]
		if max(arr) == k:
			print('YES')
			print(str(k) + ' ' + str(min(arr)) + ' ' + str(min(arr)))
			continue
		else:
			print('NO')
			continue


t = int(input())
while t > 0:
	txt = input().split(' ')
	(x, y, z) = (int(txt[0]), int(txt[1]), int(txt[2]))
	(a, b, c) = (1, 1, 1)
	if x != y and x != z and (y != z) or (x > y and y == z) or (y > x and x == z) or (z > y and y == x):
		print('NO')
	else:
		print('YES')
		if x == y:
			print(x, z, z)
		elif x == z:
			print(y, x, y)
		elif y == z:
			print(x, x, y)
	t -= 1


def solve(x, y, z):
	for a in [x, y, z]:
		for b in [x, y, z]:
			for c in [x, y, z]:
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					return (a, b, c)
	return False
for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	r = solve(x, y, z)
	if r == False:
		print('NO')
	else:
		print('YES')
		print(*r)


t = int(input())
for q in range(t):
	(x, y, z) = [int(i) for i in input().split()]
	(a, b, c) = (y, z, 1)
	if x == 1 and y != z:
		print('NO')
	elif x == 1 and y == z:
		print('YES')
		print(1, 1, z)
	elif x != max(a, b):
		if y == z and x < y:
			print('YES')
			print(x, 1, y)
		else:
			print('NO')
	else:
		print('YES')
		print(a, b, c)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if len(set(l)) == 3:
		print('NO')
	elif len(set(l)) == 2 and l.count(max(l)) == 1:
		print('NO')
	elif len(set(l)) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	else:
		m = max(l)
		m1 = min(l)
		print('YES')
		print(m, m1, m1)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	if l.count(l[0]) == 1:
		print('NO')
	else:
		print('YES')
		if l.count(l[0]) == 3:
			print(l[0], l[0], l[0])
		else:
			print(l[0], l[2], l[2])


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	maxim = max(max(x, y), z)
	minim = min(min(x, y), z)
	if x + y != 2 * maxim and y + z != 2 * maxim and (x + z != 2 * maxim):
		print('NO')
	else:
		print('YES')
		print(maxim, minim, minim)


import sys
t = int(input().strip())
while t > 0:
	t -= 1
	arr = list(map(int, input().strip().split()))
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
	else:
		print('YES')
		print(arr[2], arr[0], arr[0])


from collections import Counter

def get_maxx2(l, maxx):
	l.sort()
	return l[0]

def solve(l):
	maxx = max(l)
	counter = Counter(l)
	if counter[maxx] == 1:
		print('NO')
	elif counter[maxx] == 2:
		print('YES')
		maxx2 = get_maxx2(l, maxx)
		print('{} {} {}'.format(maxx, maxx2, 1))
	else:
		print('YES')
		print('{} {} {}'.format(maxx, maxx, maxx))
t = int(input())
for i in range(t):
	solve([int(x) for x in input().split()])


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())
f = []
for i in range(t):
	(x, y, z) = sorted(list(map(int, input().split())))
	if y != z:
		f.append('NO')
	else:
		(a, c) = (x, z)
		for b in range(1, a + 1):
			if x == max(a, b):
				f.append('YES\n' + str(a) + ' ' + str(b) + ' ' + str(c))
				break
print(*f, sep='\n')


from collections import Counter
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	flag = 0
	if x == y:
		if x >= z:
			flag = 1
			a = x
			b = z
			c = z
	if y == z:
		if y >= x:
			flag = 1
			a = y
			b = x
			c = x
	if x == z:
		if x >= y:
			flag = 1
			a = x
			b = y
			c = y
	if flag == 1:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


test_cases = int(input())
for i in range(test_cases):
	numbers = list(map(int, input().split()))
	if len(set(numbers)) == 1:
		print('YES')
		print(' '.join([str(i) for i in numbers]))
	elif numbers.count(max(numbers)) == 2:
		print('YES')
		print(max(numbers), min(numbers), '1')
	else:
		print('NO')


def main(a, b, c):
	if b > a and b > c:
		return 'NO'
	if a > b and a > c:
		return 'NO'
	if c > a and c > b:
		return 'NO'
	print('YES')
	res = (str(min(a, b, c)) + ' ') * 2 + str(max(a, b, c))
	return res
for _ in range(int(input())):
	(a, b, c) = list(map(int, input().split()))
	print(main(a, b, c))


def solve():
	array = list(map(int, input().split()))
	mx = max(array)
	mn = min(array)
	(x, y, z) = array
	if x <= y and z == y or (x == y and z <= y) or (x == z and y <= x):
		print('YES')
		if x == z and y == z and (x == y):
			print('{} {} {}'.format(x, y, z))
		else:
			print('{} {} {}'.format(mx, mn, 1))
	else:
		print('NO')
t = int(input())
while t != 0:
	t -= 1
	solve()


for i in range(int(input())):
	l = list(map(int, input().split()))
	k = max(l)
	if len(l) == len(set(l)):
		print('NO')
	elif l.count(k) >= 2 and len(set(l)) != 1:
		l = [i for i in l if i != k]
		print('YES')
		print(str(k) + ' ' + '1' + ' ' + str(l[0]))
	elif len(set(l)) == 1:
		print('YES')
		print(*l)
	else:
		print('NO')


a = int(input())
for lmn in range(0, a):
	l = list(map(int, input().split()))
	a = l[0]
	b = l[1]
	c = l[2]
	if a != b and b != c and (a != c):
		print('NO')
	elif a == b and a < c:
		print('NO')
	elif a == c and a < b:
		print('NO')
	elif c == b and b < a:
		print('NO')
	else:
		max2 = max(a, max(b, c))
		x = max2
		y = 0
		if a != max2:
			y = a
		elif b != max2:
			y = b
		else:
			y = c
		if x > 1 and y > 1:
			print('YES')
			print(x, y, 1)
		else:
			print('YES')
			print(x, 1, 1)


t = int(input())
for i in range(t):
	(X, Y, Z) = input().split()
	x = int(X)
	y = int(Y)
	z = int(Z)
	lst = [x, y, z]
	a = max(lst)
	c = min(lst)
	if x != y and y != z and (x != z) or lst.count(a) < 2:
		print('NO')
	if lst.count(a) >= 2:
		print('YES')
		lst1 = [a, c, c]
		print(' '.join(map(str, lst1)))


toint = lambda x: int(x)

def get_line_int():
	line = input().strip().split(' ')
	line = list(map(toint, line))
	return line
t = int(input())
for ___ in range(t):
	l = get_line_int()
	(x, y, z) = (l[0], l[1], l[2])
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x != y and y != z and (x != z):
		print('NO')
	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')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	i = max(x, y, z)
	j = min(x, y, z)
	if x == y == i or x == z == i or y == z == i:
		print('YES')
		print(i, j, j)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y:
		if x >= z:
			print('YES')
			print(x, z, 1)
			continue
		else:
			print('NO')
			continue
	if x == z:
		if x >= y:
			print('YES')
			print(x, y, 1)
			continue
		else:
			print('NO')
			continue
	if z == y:
		if z >= x:
			print('YES')
			print(x, z, 1)
			continue
		else:
			print('NO')
			continue
	print('NO')


from queue import LifoQueue

def print_sol(c, sol):
	print('Case #{}: {}'.format(c, sol))

def rd_int():
	return int(input())

def rd_str():
	return input()

def rd_str_lst():
	return input().split(' ')

def sp_str_lst():
	return list(input())

def rd_int_lst():
	return [int(i) for i in rd_str_lst()]

def sp_int_lst():
	return [int(i) for i in sp_str_lst()]

def dfs(g, i, v):
	v[i] = True
	for j in g[i]:
		if not v[j]:
			dfs(g, j, v)
	print(i)

def dfs_iter(g, i, n):
	v = [False] * n
	stack = LifoQueue()
	stack.put(i)
	while stack.not_empty:
		u = stack.get()
		v[u] = True
		print(u)
		for i in g[u]:
			if not v[i]:
				stack.put(i)

def main():
	t = rd_int()
	for c in range(1, t + 1):
		d = rd_int_lst()
		d.sort(reverse=True)
		if d[0] != d[1]:
			print('NO')
		else:
			print('YES')
			print(d[0], d[2], d[2])
main()


a = int(input())
for i in range(a):
	user_input = input().split()
	all_numbers = [int(x.strip()) for x in user_input]
	x = all_numbers[0]
	y = all_numbers[1]
	z = all_numbers[2]
	if x > y and x > z or (y > z and y > x) or (z > y and x < z) or (x > y and y > z) or (x < y and x > z) or (z > x and x > y):
		print('NO')
	else:
		print('YES')
		if x == y:
			a = x
			c = z
			b = z
		elif x == y and y == z:
			(a, b, c) = x
		elif y == z:
			b = x
			a = x
			c = y
		elif x == z:
			a = x
			c = y
			b = y
		print(a, b, c)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	l.sort()
	l.reverse()
	(x, y, z) = l
	if x == y:
		if x == z:
			print('YES')
			print(x, x, x)
		else:
			print('YES')
			print(x, z, z)
	else:
		print('NO')


t = int(input())
for j in range(t):
	lst = [int(i) for i in input().split()]
	lst.sort()
	if lst[1] != lst[2]:
		print('NO')
	else:
		print('YES')
		print(lst[0], lst[0], lst[2])


def sol():
	strn = input().split()
	x = int(strn[0])
	y = int(strn[1])
	z = int(strn[2])
	if max(x, y) != z and max(x, z) != y:
		print('NO')
	else:
		print('YES')
		if min(x, z) == 0 or y == 0:
			print(max(x, z, y), 0, 0)
		else:
			print(max(x, z, y), min(x, y, z), 1)
for i in range(int(input())):
	sol()


n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
for i in range(n):
	b = sorted(a[i])
	if b[0] == b[1] == b[2]:
		print('YES')
		print(*b)
	if b[0] == b[1] and b[1] < b[2]:
		print('NO')
	if b[0] < b[1] and b[1] == b[2]:
		print('YES')
		print(b[0], b[0], b[1])
	if b[0] < b[1] < b[2]:
		print('NO')


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


num = input()
for x in range(int(num)):
	nums = input()
	(a, b, c) = map(int, nums.split())
	if a == b and b == c:
		print('YES\n%d %d %d' % (a, b, c))
	elif a != b and b != c and (a != c):
		print('NO')
	else:
		temp = [a, b, c]
		temp.sort()
		if temp[2] == temp[1]:
			print('YES\n%d %d %d' % (temp[2], temp[0], temp[0]))
		else:
			print('NO')


t = int(input())
for i in range(t):
	l = input().split()
	l = [int(i) for i in l]
	s = set(l)
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	elif l.count(max(s)) == 2:
		print('YES')
		for k in s:
			print(k, end=' ')
		print(1)
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	if a.count(max(a)) == 1:
		print('NO')
	else:
		a.sort()
		print('YES')
		print(max(a), a[0], 1)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x != y and x != z and (y != z):
		print('NO')
	elif x == y and z > x:
		print('NO')
	elif x == z and y > x:
		print('NO')
	elif y == z and x > y:
		print('NO')
	else:
		print('YES')
		a = sorted([x, y, z])
		print(a[0], a[0], a[1])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def lessThanX(a, x):
	i = bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def BinarySearch(a, x):
	i = bisect_right(a, x)
	if i != len(a) + 1 and a[i - 1] == x:
		return i - 1
	else:
		return -1

def main():
	for i in range(ip()):
		fu = ai()
		fu.sort()
		a = 1
		b = fu[0]
		c = fu[1]
		if fu[2] == max(b, c):
			print('YES')
			print(1, b, c)
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
ip = lambda : int(sys.stdin.readline().rstrip('\r\n'))
ai = lambda : list(map(int, sys.stdin.readline().split()))
ei = lambda : map(int, sys.stdin.readline().split())
main()


def possibleTriple(x, y, z):
	tem = ' '.join((str(i) for i in [x, x, y]))
	return 'NO' if z > y else '\n'.join((str(i) for i in ['YES', tem]))
t = int(input())
for _ in range(t):
	(x, y, z) = sorted(map(int, input().split()))
	print(possibleTriple(x, y, z))


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('Yes')
		print(a, b, c)
		continue
	d = [a, b, c]
	d.sort()
	if a == b and c < a or (b == c and a < b) or (c == a and b < c):
		print('Yes')
		print(d[2], d[0], d[0])
		continue
	print('No')


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for x in input().split()]

def fi():
	return int(input())

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	(a, b, c) = mi()
	l = [a, b, c]
	if len(set(l)) == 1:
		print('YES')
		print(a, b, c)
	elif len(set(l)) == 3:
		print('NO')
	else:
		flag = 0
		for i in l:
			for j in l:
				for k in l:
					if max(i, j) == a and max(j, k) == b and (max(i, k) == c):
						flag = 1
						ans = [i, j, k]
		if flag == 1:
			print('YES')
			print(*ans)
		else:
			print('NO')


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	(m, n) = (max(a, b, c), min(a, b, c))
	(mc, nc) = (0, 0)
	if a == n:
		nc += 1
	else:
		mc += 1
	if b == n:
		nc += 1
	else:
		mc += 1
	if c == n:
		nc += 1
	else:
		mc += 1
	if a != b and b != c and (c != a):
		print('NO')
	elif a == b and b == c and (c == a):
		print('YES')
		print(a, b, c)
	elif nc > mc:
		print('NO')
	elif mc > nc:
		print('YES')
		print(n, n, m)


import sys
input = sys.stdin.readline

def main():
	for t in range(int(input())):
		s = list(map(int, input().split()))
		s.sort()
		(x, y, z) = (s[2], s[1], s[0])
		a = x
		b = z
		c = 1
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
main()


for _ in range(int(input())):
	num = list(map(int, input().split()))
	num.sort(reverse=True)
	if num[0] != num[1]:
		print('NO')
		continue
	else:
		print('YES')
		print(num[0], num[-1], num[-1])


def permuting(arr):
	if arr[0] == arr[1] == arr[2]:
		print('YES')
		for i in range(3):
			print(arr[0], end=' ')
		print()
		return
	elif arr[0] == arr[1] > arr[2]:
		print('YES')
		print(arr[0], end=' ')
		print(arr[2], end=' ')
		print(arr[2], end=' ')
		print()
	elif arr[0] == arr[2] > arr[1]:
		print('YES')
		print(arr[0], end=' ')
		print(arr[1], end=' ')
		print(arr[1], end=' ')
		print()
	elif arr[1] == arr[2] > arr[0]:
		print('YES')
		print(arr[1], end=' ')
		print(arr[0], end=' ')
		print(arr[0], end=' ')
		print()
	else:
		print('NO')
t = int(input())
for i in range(t):
	arr = list(map(int, input().strip().split()))
	permuting(arr)


def sol(x, y, z):
	if x == y and y == z:
		return 'YES\n' + str(x) + ' ' + str(y) + ' ' + str(z)
	if x == y or y == z or z == z:
		l = [x, y, z]
		l = sorted(l)
	if l[1] == l[2]:
		return 'YES\n' + str(l[2]) + ' ' + str(l[0]) + ' 1'
	return 'NO'
n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	print(sol(x, y, z))


test = int(input())

def solve():
	arr = [int(i) for i in input().split()]
	a = arr[0]
	b = arr[1]
	c = arr[2]
	if arr[0] == arr[1] and arr[0] == arr[2]:
		print('YES')
		print(a, b, c)
	elif a != b and b != c and (a != c):
		print('NO')
	elif a == b:
		if c < b:
			print('YES')
			print(b, c, c)
		else:
			print('NO')
	elif c == b:
		if a < b:
			print('YES')
			print(b, a, a)
		else:
			print('NO')
	elif a == c:
		if b < a:
			print('YES')
			print(c, b, b)
		else:
			print('NO')
	else:
		print('NO')
while test:
	solve()
	test -= 1


for _ in range(int(input())):
	A = list(map(int, input().split()))
	if A.count(max(A)) == 1:
		print('NO')
	elif A.count(max(A)) == 2:
		print('YES')
		print(min(A), min(A), max(A))
	elif A.count(max(A)) == 3:
		print('YES')
		print(A[0], A[1], A[2])


T = int(input())

def printArr(arr):
	ret = ''
	ret = str(arr[0]) + ' ' + str(arr[0]) + ' ' + str(arr[2])
	print(ret)
while T > 0:
	arr = [int(el) for el in input().split(' ')]
	arr.sort()
	if arr[1] == arr[2]:
		print('YES')
		printArr(arr)
	else:
		print('NO')
	T -= 1


try:
	n = int(input())
	ls = []
	for i in range(n):
		temp = list(map(int, input().split()))
		ls.append(temp)
	for i in ls:
		l = i
		i.sort()
		if i[1] == i[2]:
			print('Yes')
			num = l.index(i[0])
			if num == 0:
				arr = [i[0], i[0], i[1]]
			if num == 1:
				arr = [i[0], i[1], i[0]]
			if num == 2:
				arr = [i[1], i[0], i[0]]
			print(*arr)
		else:
			print('No')
except:
	pass


t = int(input())
for _ in range(t):
	x = list(map(int, input().split()))
	x.sort()
	a = x[0]
	b = x[1]
	c = x[2]
	if a == b and b == c:
		print('YES')
		print(a, b, c)
	elif b == c:
		print('YES')
		print(min(a, b), min(a, b), c)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	lol = [int(n) for n in input().split()]
	lol.sort()
	if lol[0] == lol[1] and lol[1] == lol[2]:
		print('YES')
		print(lol[0], lol[0], lol[0])
	elif lol[0] == lol[1] and lol[1] != lol[2]:
		print('NO')
	elif lol[0] != lol[1] and lol[1] == lol[2]:
		print('YES')
		print(lol[0], lol[1], lol[0])
	else:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	mylist = []
	mylist.append(x)
	mylist.append(y)
	mylist.append(z)
	maxv = max(mylist)
	if x == y and y == z:
		print('YES')
		print(f'{x} {x} {x}')
	elif mylist.count(maxv) == 2:
		myset = list(set(mylist))
		for ele in myset:
			if ele != maxv:
				x = ele
				break
		print('YES')
		print(f'{ele} {ele} {maxv}')
	else:
		print('NO')
	t -= 1


t = int(input())
while t:
	t -= 1
	(x, y, z) = map(int, input().split())
	if x == y >= z:
		print('yes')
		a = x
		b = z
		c = b - 1
		if c <= 0:
			c = b
		print(a, b, c)
	elif x == z >= y:
		b = x
		a = y
		c = a - 1
		if c <= 0:
			c = a
		print('yes')
		print(a, b, c)
	elif x <= z == y:
		c = z
		b = x
		a = b - 1
		if a <= 0:
			a = b
		print('yes')
		print(a, b, c)
	else:
		print('no')


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


for _ in range(int(input())):
	myList = list(map(int, input().split()))
	amr = set(myList)
	if len(amr) <= 2:
		mn = min(myList)
		mx = max(myList)
		countMn = myList.count(mn)
		countMx = myList.count(mx)
		if countMx < countMn:
			print('NO')
		elif mn == mx:
			print('YES')
			print(*myList)
		elif myList[0] == mx:
			print('YES')
			print(mx, mn, mn)
		else:
			print('YES')
			print(mn, mn, mx)
	else:
		print('NO')


t = int(input())
m = [[int(j) for j in input().split()] for i in range(t)]
for i in range(t):
	if m[i][0] == m[i][1] == m[i][2]:
		print('YES')
		print(m[i][0], m[i][0], m[i][0])
	elif m[i][0] + m[i][1] + m[i][2] - max(m[i][0], m[i][1], m[i][2]) - max(m[i][0], m[i][1], m[i][2]) == min(m[i][0], m[i][1], m[i][2]):
		print('YES')
		if min(m[i][0], m[i][1], m[i][2]) == 1:
			print(max(m[i][0], m[i][1], m[i][2]), 1, 1)
		else:
			print(max(m[i][0], m[i][1], m[i][2]), min(m[i][0], m[i][1], m[i][2]), min(m[i][0], m[i][1], m[i][2]) - 1)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if a == b:
		if c <= b:
			print('YES')
			print(a, c, c)
		else:
			print('NO')
	elif b == c:
		if a <= b:
			print('YES')
			print(a, a, b)
		else:
			print('NO')
	elif a == c:
		if b <= a:
			print('YES')
			print(b, a, b)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	l = [0] * 3
	l[0] = x
	l[1] = y
	l[2] = z
	l.sort()
	if l.count(m) >= 2:
		print('YES')
		print(min(x, y, z), max(x, y, z), 1)
	else:
		print('NO')
	t = t - 1


t = int(input())
while t > 0:
	l1 = list(map(int, input().strip().split()))
	l1.sort()
	l1.reverse()
	if l1[0] == l1[1]:
		print('YES')
		print(l1[0], l1[2], '1')
	else:
		print('NO')
	t -= 1


def fun(l):
	if l[0] == l[1] and l[1] == l[2]:
		print('YES')
		print(l[0], l[1], l[2])
		return
	if l[0] != l[1] and l[1] != l[2] and (l[2] != l[0]):
		print('NO')
		return
	maxy = max(l)
	mini = min(l)
	c = 0
	for item in l:
		if item == maxy:
			c = c + 1
	if c == 1:
		print('NO')
	else:
		print('YES')
		print(maxy, mini, mini)
	return
n1 = int(input())
for _ in range(n1):
	n2 = input()
	l = [int(item) for item in n2.split()]
	fun(l)


def solve(x, y, z):
	a = sorted([x, y, z])
	if a[1] == a[2]:
		return [a[0], a[0], a[1]]
	return -1
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	p = solve(x, y, z)
	if p == -1:
		print('NO')
	else:
		print('YES')
		print(*p)


for i in range(int(input())):
	l = list(map(int, input().split()))
	p = max(l)
	if l.count(p) < 2:
		print('NO')
	else:
		print('YES')
		print(min(l), min(l), p)


t = int(input())
for test in range(t):
	x = input()
	y = x.split()
	y = [int(y[0]), int(y[1]), int(y[2])]
	y.sort()
	if y[1] == y[2]:
		print('YES')
		print(y[0], y[0], y[1])
	else:
		print('NO')


t = int(input())
for i in range(t):
	k = input()
	m = k.split()
	x = int(m[0])
	y = int(m[1])
	z = int(m[2])
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if x > z:
			print('YES')
			print(x, z, z)
		else:
			print('NO')
	elif y == z:
		if y > x:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
	elif x == z:
		if x > y:
			print('YES')
			print(x, y, y)
		else:
			print('NO')
	else:
		print('NO')


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


def find(list1):
	if list1[1] == list1[2]:
		print('YES')
		print(f'{list1[2]} {list1[0]} {list1[0]}')
	else:
		print('NO')
t = int(input())
while t:
	list1 = [0]
	list1.clear()
	list1 = list(map(int, input().split()))
	list1.sort()
	find(list1)
	t = t - 1


tcs = int(input())
for tc in range(tcs):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	l.sort()
	if l[0] == l[1] == l[2]:
		print('YES')
		print(l[2], l[1], l[0])
	elif l[1] == l[2]:
		print('YES')
		print(l[2], l[0], 1)
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	aa = []
	aa.extend([a[0], a[2], max(a[2] - 1, 1)])
	if max(aa[1], aa[2]) in a:
		a.remove(max(aa[1], aa[2]))
		if max(aa[0], aa[2]) in a:
			a.remove(max(aa[0], aa[2]))
			if max(aa[0], aa[1]) in a:
				a.remove(max(aa[0], aa[1]))
				print('YES')
				for i in aa:
					print(i, end=' ')
				print()
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [0] * 3
	l[0] = x
	l[1] = y
	l[2] = z
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif len(set(l)) == 2:
		for i in set(l):
			if l.count(i) == 2:
				c = i
				break
		if c == max(l):
			print('YES')
			if min(set(l)) - 1 <= 0:
				print(*set(l), 1)
			else:
				l.append(min(set(l)) - 1)
				print(*set(l))
		else:
			print('NO')
	else:
		print('NO')


a = int(input())
for i in range(a):
	(q, w, e) = map(int, input().split())
	if q == w and q >= e:
		print('YES ', q, e, e)
	elif q == e and q >= w:
		print('YES ', q, w, w)
	elif e == w and e >= q:
		print('YES ', e, q, q)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x > z:
		print(f'YES\n{x} {z} {z}')
	elif x == z and x > y:
		print(f'YES\n{x} {y} {y}')
	elif y == z and y > x:
		print(f'YES\n{y} {x} {x}')
	elif x == y and y == z:
		print(f'YES\n{x} {x} {x}')
	else:
		print('NO')


from sys import stdin, stdout
from math import factorial
for _ in range(int(stdin.readline().strip())):
	(x, y, z) = list(map(int, stdin.readline().strip().split()))
	l = [x, y, z]
	if l.count(max(x, y, z)) == 2:
		stdout.write('YES' + '\n')
		stdout.write(' '.join([str(min(x, y, z)), str(max(x, y, z)), str(min(x, y, z))]) + '\n')
	elif l.count(max(x, y, z)) == 3:
		stdout.write('YES' + '\n')
		stdout.write(' '.join([str(max(x, y, z)), str(max(x, y, z)), str(min(x, y, z))]) + '\n')
	else:
		stdout.write('NO' + '\n')


import io
import os
from collections import Counter, defaultdict, deque

def solve(X, Y, Z):
	freq = Counter([X, Y, Z])
	if len(freq) == 3:
		return 'NO'
	if len(freq) == 1:
		return 'YES\n' + str(X) + ' ' + str(X) + ' ' + str(X)
	mx = max(freq.keys())
	mn = min(freq.keys())
	if freq[mn] == 2:
		return 'NO'
	return 'YES\n' + str(mn) + ' ' + str(mx) + ' ' + str(mn)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(X, Y, Z) = [int(x) for x in input().split()]
	ans = solve(X, Y, Z)
	print(ans)


n = int(input())
for _ in range(n):
	vals = list(map(int, input().split()))
	vals.sort()
	if vals[1] == vals[2]:
		print('YES')
		print('%i %i %i' % (vals[0], vals[0], vals[1]))
	else:
		print('NO')


t = int(input())
for ex in range(t):
	x = [int(i) for i in input().split()]
	x.sort(reverse=True)
	if x[0] == x[1] and x[2] <= x[1]:
		print('YES')
		ans = str()
		ans += str(x[0]) + ' ' + str(x[2]) + ' ' + str(x[2])
		print(ans)
	else:
		print('NO')


n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	l.sort()
	(a, b, c) = (l[0], l[1], l[2])
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b:
		print('NO')
	elif b == c:
		print('YES')
		print(a, a, c)
	else:
		print('NO')
		continue


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


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if [max(x, y, z) > i for i in [x, y, z]].count(True) == 2:
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), 1)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if not (x == max(y, z) or y == max(z, x) or z == max(x, y)):
		print('NO')
		continue
	print('YES')
	if x == y and y == z:
		print(*[str(x)] * 3)
	elif x == z:
		print(y, x, 1)
	elif x == y:
		print(x, 1, z)
	else:
		print(x, 1, y)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and x == z and (y == z):
		print('YES')
		print(x, y, z)
	elif x != y and x != z and (y != z):
		print('NO')
	else:
		lis = [x, y, z]
		mx = max(lis)
		m = 0
		mn = min(lis)
		mi = 0
		for i in lis:
			if i == mx:
				m += 1
			elif i == mn:
				mi += 1
		if m == 2:
			print('YES')
			print(mx, mn, 1)
		else:
			print('NO')


t = int(input())
for tests in range(t):
	number_list = sorted([int(i) for i in input().split()])
	if number_list[2] == number_list[1]:
		print('YES')
		print(number_list[2], number_list[0], 1)
	else:
		print('NO')


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	nums = [x, y, z]
	if nums.count(max(x, y, z)) < 2:
		print('NO')
		continue
	else:
		print('YES')
		print(max(nums), end=' ')
		print(1, end=' ')
		while max(x, y, z) in nums and len(nums) > 1:
			nums.pop(nums.index(max(x, y, z)))
		print(max(nums))


for _ in range(int(input())):
	a = list(map(int, input().split()))
	k = set(a)
	if len(k) == 1:
		print('YES')
		print(a[0], a[0], a[0])
	elif len(k) == 2 and a.count(min(a)) == 2:
		print('NO')
	elif len(k) == 3:
		print('NO')
	else:
		print('YES')
		print(max(a), min(a), min(a))


t = int(input())
while t > 0:
	t -= 1
	l = list(map(int, input().split()))
	(x, y, z) = (l[0], l[1], l[2])
	(a, b, c) = (1, 1, 1)
	if x > y:
		b = x
		c = y
	elif x < y:
		a = x
		c = y
	elif x > z:
		a = x
		c = z
	else:
		a = b = c = x
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))
	else:
		print('NO')


n = int(input())
for x in range(n):
	(a, b, c) = map(int, input().strip().split()[:3])
	l = [a, b, c]
	if l.count(max(l)) < 2:
		print('NO')
	else:
		print('YES')
		print(max(l), min(l), min(l))


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	(x, y, z) = (l[0], l[1], l[2])
	if x != y and x != z and (y != z):
		print('NO')
		continue
	if x == y:
		if z <= x:
			a = x
			b = z
			c = max(b - 1, 1)
		else:
			print('NO')
			continue
	elif y == z:
		if x <= y:
			c = y
			a = x
			b = max(a - 1, 1)
		else:
			print('NO')
			continue
	elif x == z:
		if y <= x:
			b = x
			c = y
			a = max(c - 1, 1)
		else:
			print('NO')
			continue
	print('YES')
	print(a, b, c)


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	minimum = min(a, b, c)
	maximum = max(a, b, c)
	if minimum + maximum * 2 != a + b + c:
		print('NO')
	else:
		print('YES')
		print(f'{maximum} {minimum} {minimum}')


def three_pair_max(three):
	three = sorted(three)
	if three[1] != three[2]:
		print('NO')
	else:
		print('YES')
		print(f'{three[0]} {three[0]} {three[2]}')
t = int(input())
for i in range(t):
	three = list(map(int, input().split()))
	three_pair_max(three)


for _ in range(int(input())):
	n = list(map(int, input().rstrip().split()))[:3]
	n.sort()
	(z, y, x) = (n[0], n[1], n[2])
	if 0 not in n:
		a = x
		b = z
		c = 1
		if x == max(a, b) and y == max(a, b) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
while t != 0:
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b and a > c or (b == c and b > a) or (a == c and a > b):
		print('YES')
		p = max(a, b, c)
		q = min(a, b, c)
		if a == b:
			print(q, p, q)
		elif a == c:
			print(p, q, q)
		else:
			print(q, q, p)
	else:
		print('NO')
	t -= 1


rr = lambda : input().strip()
rri = lambda : int(rr())
rrm = lambda : [int(x) for x in rr().split()]
from sys import stdin, stdout, setrecursionlimit

def sol():
	lis = rrm()
	lis.sort()
	if lis[1] != lis[2]:
		print('NO')
		return
	print('YES')
	print(1, lis[0], lis[1])
	return

def main():
	T = rri()
	for t in range(1, T + 1):
		ans = sol()
main()


T = int(input())
while T > 0:
	(x, y, z) = [int(x) for x in input().split()]
	if x != y and y != z and (z != x):
		print('NO')
		T -= 1
	elif x == y and y == z and (z == x):
		print('YES')
		print('{} {} {}'.format(x, y, z))
		T -= 1
	elif x == y and z != x or (y != z and z == x) or (x != y and y == z):
		c = 0
		ex = 0
		s = max(x, y, z)
		if x == s:
			c += 1
		if y == s:
			c += 1
		if z == s:
			c += 1
		if c == 2:
			print('YES')
			a = s
			b = min(x, y, z)
			c = min(x, y, z)
			print('{} {} {}'.format(a, b, c))
		else:
			print('NO')
		T -= 1
	else:
		print('NO')
		T -= 1


t = int(input())
for _ in range(t):
	inp = list(map(int, input().split()))
	inp.sort()
	if inp[1] != inp[2]:
		print('NO')
	else:
		print('YES')
		print(inp[2], end=' ')
		print(inp[0], end=' ')
		print(inp[0])


for _ in range(int(input())):
	l = list(map(int, input().split()))
	l.sort()
	a = max(l)
	if l.count(a) < 2:
		print('NO')
	else:
		b = min(l)
		if b > 1:
			c = b - 1
		else:
			c = b
		print('YES')
		print(a, b, c)


for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	a.sort()
	if a[0] < a[1] and a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[1])
	elif a[0] == a[1] == a[2]:
		print('YES')
		print(a[0], a[1], a[2])
	else:
		print('NO')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(x, y, z) = [int(x) for x in inp().split()]
	count = 0
	for i in [x, y, z]:
		if max(x, y, z) == i:
			count += 1
	if count < 2:
		print('NO')
	else:
		print('YES')
		a = sorted([x, y, z])
		print(a[-1], a[0], a[0])


t = int(input())
for _ in range(t):
	l = [int(x) for x in input().split()]
	l.sort(reverse=True)
	if l[0] != l[1]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[2], l[2])


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	a = sorted(L())
	if len(set(a)) == 3 or a[0] == a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[-1])


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	mxa = max(x, y, z)
	count = 0
	if mxa == x:
		count += 1
	else:
		other = x
	if mxa == y:
		count += 1
	else:
		other = y
	if mxa == z:
		count += 1
	else:
		other = z
	if count > 1:
		print('YES')
		if x == y == z:
			print(x, x, x)
		else:
			print(mxa, other, other)
	else:
		print('NO')


t = int(input())
for i in range(t):
	ch = input()
	L = sorted([int(i) for i in ch.split()])
	if L[1] == L[2]:
		print('YES')
		print(L[2], L[0], L[0])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	xyz = [int(x) for x in input().split()]
	(x, y, z) = xyz
	abc = [-1, -1, -1]

	def dfs(idx):
		if idx == 3:
			(a, b, c) = abc
			if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
				return abc.copy()
			else:
				return None
		else:
			for i in range(3):
				abc[idx] = xyz[i]
				ans = dfs(idx + 1)
				if ans != None:
					return ans
			abc[idx] = -1
			return None
	ans = dfs(0)
	if ans == None:
		print('NO')
	else:
		print('YES')
		print(' '.join([str(x) for x in ans]))


t = int(input())
for _ in range(t):
	L = list(map(int, input().split()))
	L.sort()
	if L[1] != L[2]:
		print('NO')
		continue
	a = L[1]
	b = L[0]
	c = b
	print('YES')
	print(a, b, c)


import sys

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(x, z, y) = MAP()
	if x == y == z:
		YES()
		print(x, x, x)
	elif x == y and x > z:
		YES()
		print(z, x, z)
	elif y == z and y > x:
		YES()
		print(x, x, y)
	elif z == x and z > y:
		YES()
		print(z, y, y)
	else:
		NO()


for t in range(int(input())):
	list = [int(k) for k in input().split()]
	list.sort(reverse=True)
	if list[0] == list[1]:
		print('YES')
		print(list[0], list[2], 1)
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	maxi = []
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y and z <= x:
		maxi.append(x)
		maxi.append(z)
		maxi.append(z)
		print('YES')
		print(*maxi)
	elif x == z and y <= x:
		maxi.append(x)
		maxi.append(y)
		maxi.append(y)
		print('YES')
		print(*maxi)
	elif y == z and x <= y:
		maxi.append(z)
		maxi.append(x)
		maxi.append(x)
		print('YES')
		print(*maxi)
	else:
		print('NO')


def main():
	for _ in range(int(input())):
		l = [int(i) for i in input().split()]
		l.sort()
		if l[1] != l[2]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[0], l[2])
main()


test_cases = int(input())
final = []
for i in range(test_cases):
	l = [int(x) for x in input().split()]
	x = l[0]
	y = l[1]
	z = l[2]
	if x < y:
		a = x
	else:
		a = y
	if y < z:
		c = y
	else:
		c = z
	if z < x:
		b = z
	else:
		b = x
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		final.append('YES')
		final.append(str(a) + ' ' + str(b) + ' ' + str(c))
	else:
		final.append('NO')
for i in range(len(final)):
	print(final[i])


t = int(input())
while t > 0:
	t -= 1
	(x, y, z) = map(int, input().strip().split(' '))
	a = [x, y]
	b = [x, z]
	c = [y, z]
	ans = []
	found = False
	for i in a:
		for j in b:
			for k in c:
				x1 = max(i, j)
				x2 = max(i, k)
				x3 = max(j, k)
				if x1 == x and x2 == y and (x3 == z):
					found = True
					ans.append([i, j, k])
	if found:
		print('YES')
		print(ans[0][0], ans[0][1], ans[0][2])
	else:
		print('NO')


for _ in range(int(input())):
	x = input()
	x = x.split()
	a = []
	for i in range(3):
		a.append(int(x[i]))
	x = max(a)
	y = a.count(x)
	if y >= 2:
		print('YES')
		print(min(a), min(a), x)
	else:
		print('NO')


import sys
input = sys.stdin.readline
output = sys.stdout.write

def main():
	tests = int(input().rstrip())
	for i in range(tests):
		(x, y, z) = map(int, input().rstrip().split())
		if x > y and z == x:
			a = y
			b = x
			c = y
		elif x < y and z == y:
			a = x
			b = x
			c = y
		elif x == y and z <= x:
			a = x
			b = z
			c = z
		else:
			output('NO')
			output('\n')
			continue
		output('YES')
		output('\n')
		output(str(a) + ' ' + str(b) + ' ' + str(c))
		output('\n')
main()


def readn():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readnos():
	return map(int, input().split())
for _ in range(readn()):
	a = readlist()
	a.sort()
	if a[0] == a[1] and a[1] == a[2]:
		print('YES')
		print(*a, sep=' ')
	elif a[0] < a[1] and a[1] < a[2]:
		print('NO')
	elif a[0] == a[1]:
		print('NO')
	else:
		print('YES')
		print(a[2], a[0], a[0], sep=' ')


for _ in range(int(input())):
	arr = list(map(int, input().split(' ')))
	highest = max(arr)
	count = 0
	for i in range(len(arr)):
		if arr[i] == highest:
			count += 1
	if count == 3:
		print('YES')
		for i in arr:
			print(i, end=' ')
		print()
	elif count < 2:
		print('NO')
	else:
		print('YES')
		for j in arr:
			if j != highest:
				print(highest, j, min(arr))


def abc(x, y, z):
	for a in [x, y, z]:
		for b in [x, y, z]:
			for c in [x, y, z]:
				if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
					return (a, b, c)
test_case = int(input())
for _ in range(test_case):
	(x, y, z) = map(int, input().split())
	result = abc(x, y, z)
	if result is None:
		print('NO')
	else:
		print('YES')
		print(*result)


N = int(input())
for I in range(0, N):
	X = sorted(list(map(int, input().split(' '))))
	if X[1] == X[2]:
		print('YES')
		print(X[0], X[0], X[1])
	else:
		print('NO')


def main():
	t = int(input())
	for i in range(0, t):
		d = list(map(int, input().split()))
		a = min(d[0], d[1])
		b = min(d[0], d[2])
		c = min(d[1], d[2])
		if max(a, b) == d[0] and max(a, c) == d[1] and (max(b, c) == d[2]):
			print('YES')
			print('{0} {1} {2}'.format(a, b, c))
		else:
			print('NO')
main()


def solve(x, y, z):
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y and x > z or (x == z and x > y) or (y == z and y > x):
		print('YES')
		M = max(x, y, z)
		m = min(x, y, z)
		print(M, m, m)
	else:
		print('NO')

def main():
	n = int(input())
	for _ in range(n):
		(x, y, z) = list(map(int, input().split()))
		solve(x, y, z)
main()


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(max(x, y), z)
	mi = min(min(x, y), z)
	c = 0
	if m == x:
		c = c + 1
	if m == y:
		c = c + 1
	if m == z:
		c = c + 1
	if c < 2:
		print('NO')
	else:
		print('YES')
		if c == 3:
			print(m, m, m)
		else:
			print(m, mi, mi)


import sys
tc = int(sys.stdin.readline())
for _ in range(tc):
	arr = list(map(int, sys.stdin.readline().split()))
	arr.sort()
	if arr[1] == arr[2]:
		print('YES')
		print(arr[2], arr[0], arr[0])
	else:
		print('NO')


a = int(input(''))
for i in range(0, a):
	(x, y, z) = map(int, input().split())
	if x == y and y == z and (x == z):
		print('YES')
		print(f'{x} {y} {z}')
	elif x > y and x == z:
		print('YES')
		print(f'{x} {y} 1')
	elif x < z and y == z:
		print('YES')
		print(f'{x} {x} {z}')
	elif x > z and x == y:
		print('YES')
		print(f'{z} {x} 1')
	else:
		print('NO')


import sys
input = sys.stdin.readline
import math

def inlt():
	return list(map(int, input().split()))
t = inlt()
for i in range(t[0]):
	arr = inlt()
	ans = []
	x = arr[0]
	y = arr[1]
	z = arr[2]
	if x == y and y == z:
		ans = [x, x, x]
	if x == y and y > z:
		ans = [x, z, z]
	if x == z and z > y:
		ans = [x, y, y]
	if y == z and z > x:
		ans = [z, x, x]
	if ans == []:
		print('NO')
		continue
	else:
		print('YES')
	for i in range(len(ans)):
		print(str(ans[i]) + ' ', end='')
	print('')


from math import ceil, log, floor, sqrt
import math
k = 1

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def is_prime(n):
	m = 2
	while m * m <= n:
		if n % m == 0:
			return False
		m += 1
	return True

def find_sum(n, a):
	a.insert(0, 0)
	for i in range(1, n + 1):
		prev = a[i] & a[i - 1]
		cur = a[i] | a[i - 1]
		a[i - 1] = prev
		a[i] = cur
	return sum((m * m for m in a))

def prin_abc(x, y, z):
	l = [x, y, z]
	l.sort()
	if l[1] < l[2]:
		print('NO')
		return
	a = b = l[0]
	c = l[2]
	print('YES')
	print(a, b, c)
t = 1
t = int(input())
while t:
	t = t - 1
	points = []
	(x, y, z) = map(int, input().split())
	prin_abc(x, y, z)


for _ in range(int(input())):
	x = list(map(int, input().split()))
	if x.count(max(x)) == 2:
		print('YES')
		xmin = min(x)
		print(xmin, xmin, max(x))
	elif x.count(max(x)) == 3:
		print('YES')
		print(x[0], x[0], x[0])
	else:
		print('NO')


for _ in range(int(input())):
	k = list(map(int, input().split()))
	x = k[0]
	y = k[1]
	z = k[2]
	if x == y or x == z or y == z:
		if x == y:
			if z > x:
				print('NO')
			else:
				print('YES')
				print('{} {} {}'.format(x, z, 1))
		elif x == z:
			if y > x:
				print('NO')
			else:
				print('YES')
				print('{} {} {}'.format(x, y, 1))
		elif y == z:
			if x > y:
				print('NO')
			else:
				print('YES')
				print('{} {} {}'.format(x, y, 1))
	else:
		print('NO')


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		(x, y, z) = ain()
		if x == y == z:
			print('YES')
			print(x, x, x)
		elif x == y:
			if z < x:
				print('YES')
				print(x, z, z)
			else:
				print('NO')
		elif y == z:
			if x < y:
				print('YES')
				print(x, x, y)
			else:
				print('NO')
		elif z == x:
			if y < x:
				print('YES')
				print(y, x, y)
			else:
				print('NO')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	mx = max(arr)
	count = 0
	for i in arr:
		if mx == i:
			count += 1
	if count <= 1:
		print('NO')
	else:
		print('YES')
		if arr[0] == arr[1]:
			arr.sort()
			print(mx, arr[0], arr[0])
		elif arr[1] == arr[2]:
			arr.sort()
			print(arr[0], arr[0], mx)
		else:
			arr.sort()
			print(arr[0], mx, arr[0])


import math
from collections import defaultdict, deque
from bisect import bisect_left, bisect_right
from sys import stdin

def mp():
	return map(int, stdin.readline().split())

def ml():
	return list(map(int, stdin.readline().split()))
for _ in range(int(input())):
	(x, y, z) = mp()
	if max(x, y) != max(y, z) or max(x, y) != max(z, x) or max(y, z) != max(x, z):
		print('NO')
	else:
		print('YES')
		if x == y:
			print(x, z, z)
		elif x == z:
			print(x, y, y)
		elif y == z:
			print(y, x, x)


x = int(input())
for i in range(x):
	(a, b, c) = map(int, input().split())
	l = [a, b, c]
	if l.count(max(a, b, c)) >= 2:
		print('YES')
		print(min(a, b, c), min(a, b, c), max(a, b, c))
	else:
		print('NO')


def check(a, b, c):
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		print('YES')
		print(a, b, c)
		return True
	return False
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = 1
	b = x
	c = y
	flag = 0
	if check(a, b, c):
		flag = 1
		continue
	a = x
	b = 1
	c = z
	if check(a, b, c):
		flag = 1
		continue
	a = y
	b = z
	c = 1
	if check(a, b, c):
		flag = 1
		continue
	if not flag:
		print('NO')


import sys, math
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from collections import deque, defaultdict
from copy import deepcopy
from math import ceil, floor, inf, sqrt, factorial, gcd, log2
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
for _ in range(ii1()):
	arr = iia()
	arr.sort()
	(x, y, z) = (arr[0], arr[1], arr[2])
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and y == z:
		print('YES')
		print(x, x, y)
	elif x != y and y != z and (x != z):
		print('NO')
	elif x == y and y != z:
		print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	arr = [x, y, z]
	if x == y and y == z:
		print('YES')
		print(x, x, x, sep=' ')
	elif x == y or y == z or z == x:
		a = max(x, y, z)
		b = min(x, y, z)
		if arr.count(a) == 2:
			print('YES')
			print(a, b, '1', sep=' ')
		elif arr.count(b) == 2:
			print('NO')
	else:
		print('NO')


try:
	for i in range(int(input())):
		(x, y, z) = list(map(int, input().split()))
		(a, b, c) = (0, 0, 0)
		if x == y:
			a = x
			if z <= a:
				(b, c) = (z, z)
				print('YES')
				print(a, b, c)
			else:
				print('NO')
		elif x == z:
			b = x
			if y <= b:
				(a, c) = (y, y)
				print('YES')
				print(a, b, c)
			else:
				print('NO')
		elif y == z:
			c = y
			if x <= c:
				(a, b) = (x, x)
				print('YES')
				print(a, b, c)
			else:
				print('NO')
		else:
			print('NO')
except:
	pass


for _ in range(int(input())):
	num = list(map(int, input().split()))
	ma = max(num)
	co = num.count(ma)
	mi = min(num)
	if co >= 2:
		if co == 3:
			print('YES')
			print(*num)
		else:
			print('YES')
			print(ma, mi, 1)
	else:
		print('NO')


for _ in range(int(input())):
	p = [int(x) for x in input().split()]
	(x, y, z) = p
	r = [min(x, y), min(x, z), min(y, z)]
	if max(r) < max(p):
		print('NO')
	else:
		print('YES')
		for i in r:
			print(i, end=' ')
		print()


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


t = int(input(''))
for i in range(t):
	list0 = list(map(int, input('').split(' ')))
	x = max(list0)
	z = min(list0)
	list0.pop(list0.index(x))
	list0.pop(list0.index(z))
	y = list0[0]
	if x == y:
		print('YES')
		list1 = [x, z, 1]
		list2 = [str(i) for i in list1]
		print(' '.join(list2))
	else:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	r = 0
	if x == y:
		if z <= x:
			r = 1
			print('YES')
			print(x, z, z)
	elif x == z:
		if y <= x:
			r = 1
			print('YES')
			print(y, x, y)
	elif y == z:
		if x <= y:
			r = 1
			print('YES')
			print(x, x, y)
	if r == 0:
		print('NO')
	t -= 1


import sys
input = sys.stdin.buffer.readline
import os
from math import *
t = int(input())
while t:
	t -= 1
	arr = list(map(int, input().split()))
	arr.sort()
	if arr[1] == arr[2]:
		print('YES')
		print(max(arr), min(arr), min(arr))
	else:
		print('NO')


from sys import stdin

def input():
	return stdin.readline()
for _ in range(int(input())):
	(x, y, z) = [int(i) for i in input().split()]
	if x == y and z <= y:
		print('YES')
		print(x, z, z)
	elif x == z and y <= x:
		print('YES')
		print(y, x, y)
	elif y == z and x <= z:
		print('YES')
		print(x, x, y)
	else:
		print('NO')


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	(x, y, z) = sorted(rl())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y:
		print('NO')
	elif z == y:
		print('YES')
		print(x, x, z)
	else:
		print('NO')
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
for i in range(n):
	l = inlt()
	x = l[0]
	y = l[1]
	z = l[2]
	l.sort()
	if l[2] == l[1]:
		print('YES')
		if l[0] == x:
			print(str(l[0]) + ' ' + str(l[0]) + ' ' + str(l[2]))
		elif l[0] == y:
			print(str(l[0]) + ' ' + str(l[2]) + ' ' + str(l[0]))
		else:
			print(str(l[2]) + ' ' + str(l[0]) + ' ' + str(l[0]))
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	q = [x, y, z]
	if q.count(max(q)) >= 2:
		if x == y and x == z:
			a = x
			b = y
			c = z
		else:
			a = max(q)
			b = min(q)
			c = 1
		print('YES')
		print(a, b, c)
	else:
		print('NO')


cases = int(input())
for t in range(cases):
	(x, y, z) = list(map(int, input().split()))
	if x == y and z <= x or (y == z and x <= z) or (z == x and y <= x):
		print('YES')
		a = min(x, y, z)
		b = max(x, y, z)
		print(a, a, b)
	else:
		print('NO')


import sys

def solve(x, y, z):
	srtd = sorted([(x, 0), (y, 1), (z, 2)])
	xyz = sorted([x, y, z])
	if len(set(xyz)) == 3:
		return None
	if x == y and x == z:
		abc = [x, x, x]
	elif min(xyz) == xyz[1]:
		return None
	else:
		return [xyz[0], xyz[0], xyz[2]]
	return sorted(abc)
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
cur = 0
for ti in range(T):
	(x, y, z) = [int(x) for x in IN[cur + 1].split(' ')]
	res = solve(x, y, z)
	if res == None:
		print('NO')
	else:
		print('YES')
		print(' '.join([str(x) for x in res]))
	cur += 1


for t in range(int(input())):
	a = [int(i) for i in input().split()]
	if a.count(max(a)) < 2:
		print('NO')
	else:
		print('Yes')
		print(max(a), min(a), min(a))


def func(x, y, z):
	global check
	(a, b, c) = (x, x, x)
	check = 1
	if x >= y:
		a = y
		if z != x:
			check = 0
		else:
			c = 1
	elif z != y:
		check = 0
	else:
		c = y
	if check:
		print('YES')
		print(a, b, c)
t = int(input())
while t:
	t += -1
	(x, y, z) = map(int, input().split())
	check = 0
	if check == 0:
		func(x, y, z)
	if check == 0:
		func(x, z, y)
	if check == 0:
		func(y, x, z)
	if check == 0:
		func(y, z, x)
	if check == 0:
		func(z, x, y)
	if check == 0:
		func(z, y, x)
	if check == 0:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = [int(i) for i in input().split()]
	if x == y and y == z and (z == y):
		print('YES')
		print(x, x, x)
	else:
		l = [x, y, z]
		if l.count(min(l)) > 1:
			print('NO')
		elif l.count(max(l)) > 1:
			print('YES')
			print(max(l), min(l), min(l))
		else:
			print('NO')
	t -= 1


t = int(input())
while t > 0:
	(x, y, z) = list(map(int, input().split()))
	m = max(x, y, z)
	if x == y and y == z:
		a = x
		b = y
		c = y
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif x != y and y != z and (z != x):
		print('NO')
	elif m == x and x != y and (x != z) and (y == z):
		print('NO')
	elif m == x and x == y:
		a = x
		b = z
		c = z
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif m == x and x == z:
		b = x
		a = y
		c = y
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif m == y and y != x and (y != z):
		print('NO')
	elif m == y and y == x:
		a = y
		b = z
		c = z
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif m == y and y == z:
		c = y
		a = x
		b = x
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif m == z and z != x and (z != y):
		print('NO')
	elif m == z and z == x:
		b = z
		a = y
		c = y
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	elif m == z and z == y:
		c = y
		a = x
		b = x
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
	t -= 1


for i in range(int(input())):
	s = list(map(int, input().split()))
	u = max(s)
	c = 0
	for ch in s:
		if ch == u:
			c += 1
	if c >= 2:
		print('YES')
		if c == 3:
			print(' '.join(map(str, s)))
		else:
			k = []
			for ch in s:
				if ch not in k:
					k.append(ch)
			print(' '.join(map(str, k)), '1')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	c = max(x, y, z)
	if x == y == c or x == z == c or z == y == c or (x == y == z):
		print('YES')
		print(1, x + y + z - 2 * c, c)
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	list1 = [a, b, c]
	set1 = set([a, b, c])
	if len(set1) == 1:
		print('YES')
		print(a, b, c)
	elif len(set1) == 2:
		m = max(set1)
		n = min(set1)
		if list1.count(m) == 2:
			print('YES')
			print(m, n, n)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
while t:
	l = list(map(int, input().split()))
	i = max(l)
	j = min(l)
	if i == j:
		print('YES')
		print(*l)
	elif l.count(i) == 2:
		print('YES')
		print(i, end=' ')
		print(j, end=' ')
		print(j)
	else:
		print('NO')
	t = t - 1


for _ in range(int(input())):
	(d, e, p) = map(int, input().split())
	if d == e and e == p:
		print('YES')
		print(e, d, p)
	else:
		n = max(d, e, p)
		m = min(d, e, p)
		if n == d and n == e or (n == e and n == p) or (n == d and n == p):
			print('YES')
			print(n, m, m)
		else:
			print('NO')


def solve():
	arr = list(map(int, input().split()))
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
		return
	print('YES')
	print(arr[0], arr[0], arr[1])

def main():
	for _ in range(int(input())):
		solve()
main()


n1 = int(input())
for x in range(n1):
	n2 = input().split(' ')
	arr = []
	for y in range(3):
		arr.append(int(n2[y]))
	arr.sort()
	x1 = arr[0]
	y1 = arr[1]
	z1 = arr[2]
	if y1 == z1:
		print('YES')
		print(z1, x1, x1, end=' ')
		print(' ')
	else:
		print('NO')


import sys
from math import sqrt
input = sys.stdin.readline

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def main():
	t = inp()
	for l in range(t):
		(x, y, z) = invr()
		if x != y and y != z and (x != z):
			print('NO')
		elif x == y and x < z or (y == z and y < x) or (x == z and x < y):
			print('NO')
		else:
			print('YES')
			print(min(x, y), min(x, z), min(y, z))
main()


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('YES')
		print(a, a, a)
	elif a == b or b == c or c == a:
		m = max(a, b, c)
		if m == a and m == b or (m == b and m == c) or (m == c and m == a):
			print('YES')
			v = max(a, b, c)
			v1 = min(a, b, c)
			print(v, v1, v1)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x >= z or (y == z and y >= x) or (z == x and z >= y):
		l = set()
		l.add(x)
		l.add(y)
		l.add(z)
		print('YES')
		print(max(l), min(l), min(l))
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y and y > z or (y == z and z > x) or (z == x and x > y):
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))
		continue
	print('NO')


for _ in range(int(input())):
	a = sorted(map(int, input().split()), reverse=True)
	x = a[0]
	y = a[1]
	z = a[2]
	a = b = c = None
	b = z
	c = b - 1
	if c == 0:
		c = 1
	a = y
	if x != a:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (z != x):
		print('NO')
	else:
		l = [x, y, z]
		k = max(l)
		p = min(l)
		if l.count(k) == 1:
			print('NO')
		elif p == x:
			print('YES')
			print(x, x, z)
		elif p == y:
			print('YES')
			print(x, y, y)
		else:
			print('YES')
			print(x, z, z)


for _ in range(int(input())):
	(a, b, c) = sorted(map(int, input().split()), reverse=True)
	if a == b:
		print('YES')
		if a == c:
			print(a, a, a)
		else:
			print(1, c, a)
	else:
		print('NO')


a = int(input())
for i in range(a):
	b = [int(j) for j in input().split(' ')]
	if b[0] == b[1] == b[2]:
		print('YES')
		print(str(b[0]), str(b[1]), str(b[2]))
	elif b[0] == b[1] and b[0] > b[2]:
		print('YES')
		print(str(b[0]), str(b[2]), str(b[2]))
	elif b[0] == b[2] and b[0] > b[1]:
		print('YES')
		print(str(b[1]), str(b[2]), str(b[1]))
	elif b[1] == b[2] and b[2] > b[0]:
		print('YES')
		print(str(b[0]), str(b[0]), str(b[2]))
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	ab = a[0]
	ac = a[1]
	bc = a[2]
	if ab > ac and ab > bc or (ac > ab and ac > bc) or (bc > ac and bc > ab):
		print('NO')
		continue
	if ab == bc == ac:
		print('YES')
		print(a[0], a[0], a[0])
	else:
		print('YES')
		if min(a) > 1:
			print(max(a), min(a), min(a) - 1)
		else:
			print(max(a), min(a), min(a))


def solve():
	(x, y, z) = map(int, input().split())
	arr = set([x, y, z])
	for a in arr:
		for b in arr:
			for c in arr:
				if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
					print('YES')
					print(a, b, c)
					return
	print('NO')
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for i in range(t):
	numbers = input()
	li = numbers.split(' ')
	x = int(li[0])
	y = int(li[1])
	z = int(li[2])
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x < y and y == z:
		print('YES')
		print(x, 1, z)
	elif y < x and x == z:
		print('YES')
		print(1, x, y)
	elif z < x and x == y:
		print('YES')
		print(x, z, 1)
	else:
		print('NO')


a = int(input())
for i in range(a):
	num = list(map(int, input().split()))
	a = 0
	b = 0
	c = 0
	if num[0] == num[1] == num[2]:
		print('YES')
		print(num[1], num[1], num[1])
	elif num[0] < num[2] and num[1] < num[2] and (num[0] == num[1]) or (num[0] < num[1] and num[2] < num[1] and (num[0] == num[2])) or (num[2] < num[0] and num[1] < num[0] and (num[2] == num[1])) or (num[1] != num[2] and num[1] != num[0] and (num[2] != num[0])):
		print('NO')
	else:
		if num[0] == num[1]:
			a = num[0]
			b = num[2]
			n = b - 1
			if n <= 0:
				n = 0
			else:
				n = 1
			c = num[2] - n
		elif num[0] == num[2]:
			b = num[0]
			a = num[1]
			n = a - 1
			if n <= 0:
				n = 0
			else:
				n = 1
			c = num[1] - n
		elif num[1] == num[2]:
			c = num[1]
			a = num[0]
			n = a - 1
			if n <= 0:
				n = 0
			else:
				n = 1
			b = num[0] - n
		print('YES')
		print(a, b, c)


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = []
	l.append(x)
	l.append(y)
	l.append(z)
	l.sort()
	if x != y and y != z and (x != z):
		print('NO')
	elif l[1] == l[2]:
		print('YES')
		print(l[1], l[0], l[0], end=' ')
	else:
		print('NO')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	xyz = list(map(int, sys.stdin.readline().split()))
	maxVal = max(xyz)
	cnt = 0
	temp = 0
	res = []
	for i in range(3):
		if xyz[i] == maxVal:
			cnt += 1
		else:
			temp = xyz[i]
	if cnt == 3:
		print('YES')
		print(maxVal, maxVal, maxVal)
	elif cnt == 2:
		print('YES')
		print(temp, temp, maxVal)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().strip().split())
	if max(x, y) == max(y, z) == max(z, x):
		print('YES')
		if x == y == z:
			print(x, y, z)
		elif x == y or y == z or z == x:
			j = min(x, y, z)
			a = max(x, y, z)
			print(j, j, a)
	else:
		print('NO')


for i in range(int(input())):
	arr = list(map(int, input().strip().split()))
	maxi = max(arr)
	if arr.count(maxi) >= 2:
		print('YES')
		if arr.count(maxi) == 3:
			print(*arr)
		else:
			for i in range(3):
				if arr[i] != maxi:
					pass
				else:
					arr[i] = 1
					break
			print(*arr)
	else:
		print('NO')


ncases = int(input())
for _ in range(ncases):
	(X, Y, Z) = map(int, input().split())
	A = [X, Y]
	B = [X, Z]
	C = [Y, Z]
	found = False
	for a in A:
		for b in B:
			for c in C:
				if X == max(a, b) and Y == max(a, c) and (Z == max(b, c)):
					print('YES')
					print(a, b, c)
					found = True
					break
			else:
				continue
			break
		else:
			continue
		break
	if not found:
		print('NO')


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().strip().split())
	v = set([x, y, z])
	if len(v) == 1:
		print('YES')
		print(x, y, z)
	elif len(v) == 2:
		if [x, y, z].count(max(v)) == 2:
			print('YES')
			print(min(v), min(v), max(v))
		else:
			print('NO')
	elif len(v) == 3:
		print('NO')


n = int(input())
cases = []
for _ in range(n):
	i = [int(i) for i in input().split(' ')]
	i.sort()
	cases.append(i)
for i in cases:
	(x, y, z) = i
	if y != z:
		print('NO')
	else:
		print('YES')
		print(' '.join([str(x), str(x), str(z)]))


import bisect as bi
import math as mt
import collections as cc
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	l = I()
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])


t = int(input())
while t != 0:
	t = t - 1
	a = list(map(int, input().split()))
	max1 = max(a)
	min1 = min(a)
	c = 0
	for i in a:
		if i == max1:
			c = c + 1
	if c >= 2:
		print('YES')
		print(max1, min1, min1)
	else:
		print('NO')


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll
tc = int(input())
for _ in range(tc):
	(x, y, z) = map(int, input().split())
	(a, b, c) = (-1, -1, -1)
	fl = False
	if x == y == z:
		print('YES')
		(a, b, c) = (x, y, z)
		fl = True
	elif x == y and x > z:
		print('YES')
		(a, b, c) = (x, z, 1)
		fl = True
	elif x == z and x > y:
		print('YES')
		(a, b, c) = (x, y, 1)
		fl = True
	elif y == z and y > x:
		print('YES')
		(a, b, c) = (y, x, 1)
		fl = True
	if fl:
		print(a, b, c)
	else:
		print('NO')


from sys import stdin
input = lambda : stdin.readline().rstrip('\r\n')
from collections import deque as que, defaultdict as vector
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
Testcase = inin()
for i in range(Testcase):
	arr = inar()
	(x, y, z) = arr[:]
	if min(arr) != 1:
		arr.append(min(arr) - 1)
	poss = False
	for a in arr:
		for b in arr:
			for c in arr:
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					poss = True
					print('YES')
					print(a, b, c)
				if poss:
					break
			if poss:
				break
		if poss:
			break
	if not poss:
		print('NO')


t = int(input())
for i in range(0, t):
	(x, y, z) = map(int, input().split())
	if x == y or y == z or x == z or (x == y == z):
		if x == y == z:
			print('YES')
			print(x, y, z)
		elif x == y:
			if z > x:
				print('NO')
			else:
				print('YES')
				print(1, x, z)
		elif x == z:
			if y > x:
				print('NO')
			else:
				print('YES')
				print(1, x, y)
		elif z == y:
			if x > z:
				print('NO')
			else:
				print('YES')
				print(1, x, z)
	else:
		print('NO')


for i in range(int(input())):
	(z, y, x) = map(int, input().split())
	if z == y == x:
		print('YES')
		print(z, z, z)
	elif x == y and z < x or (x == z and y < x) or (y == z and x < y):
		print('YES')
		numbers = {z, x, y}
		numbers = list(numbers)
		print(numbers[0], numbers[1], min(z, x, y))
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = []
	a = [int(i) for i in input().split()]
	a.sort()
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[2], end='\n')


for i in range(int(input())):
	arr = list(map(int, input().split()))
	abr = sorted(arr)
	if abr[-1] > abr[0] and abr[-1] > abr[1]:
		print('NO')
	else:
		if arr[1] == arr[0] == arr[2]:
			(a, c, b) = (arr[1], arr[1], arr[1])
		elif arr[0] == arr[2]:
			a = arr[0]
			b = arr[1]
			c = arr[1]
		elif arr[0] == arr[1]:
			b = arr[0]
			(a, c) = (arr[2], arr[2])
		else:
			c = arr[1]
			(a, b) = (arr[0], arr[0])
		print('YES')
		print(a, b, c)


n = int(input())
for i in range(n):
	(x, y, z) = sorted(map(int, input().split()))
	if y == z:
		print('Yes')
		print(x, 1, z)
	else:
		print('No')


for i in range(int(input())):
	x = list(map(int, input().split()))
	x.sort(reverse=True)
	if x[0] == x[1]:
		print('YES')
		if x[1] == x[2]:
			print(*x)
		else:
			x[-2] = 1
			print(*x)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
		continue
	else:
		a = max(x, y, z)
		if [x, y, z].count(a) >= 2:
			print('YES')
			b = min(x, y, z)
			c = 1
			print(a, b, c)
		else:
			print('NO')


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


def password(a, size):
	ma = max(a)
	mi = min(a)
	if a.count(ma) == size:
		print('YES')
		printList([ma] * 3)
	elif a.count(ma) == size - 1:
		print('YES')
		printList([ma] + [mi] * 2)
	else:
		print('NO')

def printList(a):
	for i in a:
		print(i, end=' ')
	print()
tests = int(input())
for i in range(tests):
	a = list(map(int, input().split()))
	password(a, 3)


n = int(input())
for _ in range(n):
	arr = [int(x) for x in input().split()]
	m = max(arr)
	c = arr.count(m)
	if c == 2:
		l = set(arr)
		print('Yes')
		print(*l, 1)
	elif c == 3:
		print('YES')
		print(*arr)
	else:
		print('NO')


t = int(input())
final = []
for i in range(t):
	k = {0: 'c', 1: 'a', 2: 'b'}
	l = [int(x) for x in input().split()]
	if max(l[0], l[1]) == max(l[1], l[2]) == max(l[0], l[2]):
		final.append('YES')
		a = l.copy()
		a.sort()
		first = []
		for i in range(3):
			first.append([l[l.index(a[0])], l.index(a[0]) + i])
			l.remove(l[l.index(a[0])])
			a.remove(a[0])
		if first[0][0] == first[1][0] and first[1][0] == first[2][0]:
			final.append([first[0][0], first[0][0], first[0][0]])
		else:
			final.append([first[0][0], first[1][0], 1])
	else:
		final.append('NO')
i = 0
while i != len(final):
	print(final[i])
	if final[i] == 'YES':
		print(*final[i + 1])
		i += 2
	else:
		i += 1


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	x = arr.count(max(arr))
	if x == 1:
		print('NO')
		continue
	print('YES')
	if x == 2:
		print(max(arr), min(arr), min(arr))
	else:
		print(*arr)


for t in range(int(input())):
	val = list(map(int, input().split()))
	val = sorted(val, reverse=True)
	if val[0] != val[1]:
		print('NO')
	else:
		print('YES')
		(a, b, c) = (val[0], val[2], val[2])
		print(a, b, c)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def read(func=int):
	return map(func, input().split())
t = int(input())
for _ in range(t):
	(x, y, z) = sorted(list(read()))
	if x <= y == z:
		print('YES')
		print(1, x, y)
	else:
		print('NO')


cases = int(input())
for case in range(cases):
	xyz = list(map(int, input().split()))
	mx = max(xyz)
	mn = min(xyz)
	if xyz.count(mx) == 1:
		print('NO')
		continue
	print('YES')
	print(mx, mn, mn)


t = int(input())
sets = []
for i in range(t):
	sets.append(sorted([int(a) for a in input().split()]))
for i in sets:
	if i[1] == i[2] and i[0] <= i[1]:
		print('YES')
		print(i[2], i[0], i[0])
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	l = list(map(int, input().split()))
	a = 0
	b = 0
	c = 0
	l.sort(reverse=True)
	x = l[0]
	y = l[1]
	z = l[2]
	if l[0] != l[1] and l[0] != l[2]:
		print('NO')
	elif l[0] == l[1] == l[2]:
		a = l[0]
		b = l[0]
		c = l[0]
		print('YES')
		print(a, b, c)
	else:
		a = x
		b = z
		c = z - 1
		if c < 1:
			c = 1
		print('YES')
		print(a, b, c)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	a = lis()
	a = sorted(a)
	if a[2] == a[1]:
		print('YES')
		print(a[0], a[0], a[1])
	else:
		print('NO')
testcase(int(inp()))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x != y and y != z and (z != x):
		print('NO')
	else:
		s = [x, y, z]
		if s.count(max(s)) == 2:
			print('YES')
			print(min(s), min(s), max(s))
		else:
			print('NO')


for _ in range(int(input())):
	(x, y, z) = sorted(map(int, input().split()))
	print('No' if z != y else 'Yes {} {} {}'.format(x, x, z))


import sys
import math, bisect
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(x, y, z) = neo()
	A = [x, y, z]
	t = len(set(A))
	A.sort()
	if t == 3:
		print('NO')
	elif t == 1:
		print('YES')
		print(*A)
	elif A[0] == A[1]:
		print('NO')
	else:
		print('YES')
		print(A[0], A[0], A[1])


t = int(input())
i = 0
l = []
while i < t:
	i = i + 1
	l = []
	(x1, y1, z1) = input().split()
	x = int(x1)
	y = int(y1)
	z = int(z1)
	l.append(x)
	l.append(y)
	l.append(z)
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])


n = int(input())
for i in range(n):
	l = list(map(int, input().split(' ')))
	l.sort()
	if l.count(max(l)) >= 2:
		print('YES')
		print('{} {} {}'.format(l[0], l[0], l[1]))
	else:
		print('NO')


from sys import stdin
from collections import Counter
input = stdin.readline
T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	l = sorted([x, y, z], reverse=True)
	cnt = Counter([x, y, z])
	if cnt[l[0]] >= 2:
		print('YES')
		print(l[0], l[-1], 1)
	else:
		print('NO')


t = int(input())
for i in range(t):
	sete = sorted([int(i) for i in input().split()])
	a = sete[-1]
	b = sete[-2]
	if a != b:
		print('NO')
	else:
		print('YES')
		print(a, sete[0], 1)


import heapq as hp
import collections
import bisect

def unpack(func=int):
	return map(func, input().split())

def l_unpack(func=int):
	return list(map(func, input().split()))

def s_unpack(func=int):
	return sorted(map(func, input().split()))

def range_n():
	return range(int(input()))

def getint():
	return int(input())

def foo(s, l, r, c, memo):
	t = (l, r, c)
	if t in memo:
		return memo[t]
	ans = 0
	if l == r:
		return 1 if s[l] != c else 0
	half = (r - l + 1) // 2
	a = abs(s[l:l + half].count(c) - half)
	b = abs(s[r - half + 1:r + 1].count(c) - half)
	ans += min(a + foo(s, l + half, r, chr(ord(c) + 1), memo), b + foo(s, l, l + half - 1, chr(ord(c) + 1), memo))
	memo[t] = ans
	return ans

def main():
	for _ in range_n():
		(x, y, z) = unpack()
		if x != y and y != z and (x != z):
			print('NO')
		elif x == z and x >= y:
			print('YES')
			print(y, y, x)
		elif x == y and x >= z:
			print('YES')
			print(z, z, x)
		elif y == z and y >= x:
			print('YES')
			print(x, x, z)
		else:
			print('NO')
main()


for _ in range(int(input())):
	li = list(map(int, input().split()))
	flag = True
	if li[0] > li[1] and li[0] > li[2]:
		flag = False
	elif li[1] > li[2] and li[1] > li[0]:
		flag = False
	elif li[2] > li[0] and li[2] > li[1]:
		flag = False
	if flag:
		print('YES')
		print(min(li[0], li[1]), min(li[0], li[2]), min(li[2], li[1]))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	(mx, mn) = (max(a, b, c), min(a, b, c))
	minc = 0
	maxc = 0
	if a == mn:
		minc += 1
	else:
		maxc += 1
	if b == mn:
		minc += 1
	else:
		maxc += 1
	if c == mn:
		minc += 1
	else:
		maxc += 1
	if a != b and b != c and (c != a):
		print('NO')
	elif a == b and b == c and (c == a):
		print('YES')
		print(a, b, c)
	elif minc > maxc:
		print('NO')
	elif maxc > minc:
		print('YES')
		print(mn, mn, mx)


for _ in range(int(input())):
	(num_1, num_2, num_3) = sorted([int(num) for num in input().split()])
	if num_1 == num_2 == num_3:
		print('YES')
		print(num_1, num_2, num_3)
	elif num_2 == num_3 and num_2 > num_1:
		print('YES')
		print(1, num_1, num_3)
	else:
		print('NO')


def main():
	for t in range(int(input())):
		a = [int(i) for i in input().split()]
		a.sort()
		if a[1] == a[2]:
			print('YES')
			print(a[0], a[0], a[1])
		else:
			print('NO')
main()


for k in range(int(input())):
	t = list(map(int, input().split()))
	t.sort()
	if t.count(t[0]) == 2:
		print('NO')
	elif len(set(t)) == 3:
		print('NO')
	else:
		print('YES')
		print(t[-1], t[0], 1)


for x in range(int(input())):
	(x, y, z) = sorted(list(map(int, input().split())))
	if y == z:
		print('YES')
		print(x, 1, z)
	else:
		print('NO')


for ii in range(int(input())):
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	if a[0] == a[1] and a[2] <= a[0]:
		print('YES')
		print(a[0], a[2], a[2])
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	a_max = min(x, y)
	b_max = min(x, z)
	c_max = min(y, z)
	pos = x == max(a_max, b_max) and y == max(a_max, c_max) and (z == max(b_max, c_max))
	if pos:
		print('YES')
		print('{} {} {}'.format(a_max, b_max, c_max))
	else:
		print('NO')


from sys import stdin, stdout
from sys import maxsize
input = stdin.readline

def solve():
	pass
test = 1
test = int(input().strip())
for t in range(0, test):
	(x, y, z) = list(map(int, input().strip().split()))
	a = max(x, y, z)
	b = min(x, y, z)
	if x == a and y == a:
		print('YES')
		print(a, b, b)
	elif x == a and z == a:
		print('YES')
		print(a, b, b)
	elif z == a and y == a:
		print('YES')
		print(a, b, b)
	else:
		print('NO')
	ans = solve()


t = int(input())
for T in range(t):
	l = sorted(list(map(int, input().split())))
	o = set(l)
	if len(o) == 2:
		if l[-1] == l[-2]:
			print('YES')
			print(l[0], l[0], l[1])
		else:
			print('NO')
	elif len(o) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	a = [int(i) for i in stdin.readline().split(' ')]
	a = sorted(a)
	if a[0] == a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[0])
	elif a[2] == a[1]:
		print('YES')
		print(a[1], a[0], a[0])
	else:
		print('NO')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def msi():
	return map(str, input().split())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007

def modInverse(b, m):
	g = gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def modu(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		return -999999999
	else:
		return inv * a % m
from math import log, sqrt, factorial, cos, tan, sin, radians, ceil, floor
import bisect
from decimal import *
getcontext().prec = 25
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793

def main():
	for _ in range(ii()):
		(x, y, z) = mi()
		f = 0
		if x == y:
			a = x
			b = z
			c = z
		elif x == z:
			b = x
			a = y
			c = y
		elif y == z:
			c = y
			a = x
			b = x
		else:
			f = 1
		if f:
			print('NO')
		elif max(a, b) != x or max(a, c) != y or max(b, c) != z:
			print('NO')
		else:
			print('YES')
			print(a, b, c)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import io, os
from collections import deque
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	l = RL()
	l.sort(reverse=True)
	ma = max(l)
	cnt = 0
	for i in range(3):
		if l[i] == ma:
			cnt += 1
	if cnt >= 2:
		print('YES')
		ans = [l[0], l[2], l[2]]
		print(*ans)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = 3
	flag = 0
	if x == y and z <= x or (x == z and y <= x) or (y == z and x <= y):
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))
	else:
		print('NO')


from sys import stdin as sin
for _ in range(int(sin.readline())):
	l = list(map(int, sin.readline().split(' ')))
	if l.count(max(l)) >= 2:
		print('YES')
		print(max(l), min(l), min(l))
	else:
		print('NO')


def fcnt1():
	result = ''
	for _ in range(int(input())):
		(x, y, z) = map(int, input().split())
		if x == y and x == z:
			result += f'YES\n{x} {y} {z}\n'
		elif x == y and x > z:
			result += f'YES\n{x} {z} {z}\n'
		elif x == z and x > y:
			result += f'YES\n{y} {x} {y}\n'
		elif y == z and y > x:
			result += f'YES\n{x} {x} {z}\n'
		else:
			result += 'NO\n'
	print(result[:-1])
fcnt1()


n = int(input())
for i in range(n):
	numbers = [int(v) for v in input().split()]
	(x, y, z) = numbers
	(a, b) = (None, None)
	if x == y:
		a = x
		b = z
	elif x == z:
		a = x
		b = y
	elif y == z:
		a = y
		b = x
	c = b
	if a is not None and b is not None and (a >= b):
		print('YES')
		print('%s %s %s' % (a, b, c))
	else:
		print('NO')


import sys
import os

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def take_input():
	if os.environ.get('check'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
take_input()
for _ in range(int(input())):
	s = int_array()
	(x, y, z) = (s[0], s[1], s[2])
	extra = list(set(s))
	if len(set(s)) == 1:
		extra = list(set(s)) + list(set(s))
	nos = [1] + extra
	if s.count(max(s)) >= 2:
		print('YES')
		print(*nos)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	temp = sorted([x, y, z])
	x = temp[0]
	y = temp[1]
	z = temp[2]
	if y != z and z != x:
		print('NO')
	else:
		print('YES')
		print(z, x, 1)


import os, sys

def _():
	return sys.stdin.readline()

def __():
	return sys.stdin.readline().split()
N = 100005
q = int(_())
for id in range(q):
	t = list(map(int, __()))
	t.sort()
	res = (t[0] == t[2]) + (t[1] == t[2]) + 1
	if res < 2:
		print('NO')
	else:
		print('YES')
		if t[2] != t[1]:
			print(t[2], t[1], 1)
		else:
			print(t[2], t[0], 1)


def main():
	for _ in range(int(input())):
		xyz = list(map(int, input().split()))
		a = max(xyz)
		if xyz.count(a) > 1:
			print('YES')
			b = a
			for i in xyz:
				if i != max(xyz):
					b = i
			print(a, b, min(a, b))
		else:
			print('NO')
main()


n = int(input())
for i in range(n):
	num = input().split(' ')
	x = int(num[0])
	y = int(num[1])
	z = int(num[2])
	arr = [x, y, z]
	m = max(arr)
	if arr.count(m) == 3:
		print('YES')
		print(m, m, m)
	elif arr.count(m) == 2:
		print('YES')
		print(m, end=' ')
		for i in arr:
			if i < m:
				print(i, end=' ')
		print(1)
	else:
		print('NO')


t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	mn = min(x, y, z)
	mx = max(x, y, z)
	if x != y != z != x:
		print('NO')
	elif x == y == z:
		print('YES')
		print(x, y, z)
	elif mx == x and mx == y or (mx == x and mx == z) or (mx == y and mx == z):
		print('YES')
		print(mn - 1 | 1, mn, mx)
	else:
		print('NO')
	t -= 1


try:
	n = int(input())
	for i in range(n):
		l = list(map(int, input().split()))
		l1 = list(dict.fromkeys(l))
		c = 0
		m = min(l)
		for z in l:
			if m == z:
				c += 1
		if c == 2:
			print('NO')
		elif len(l1) == 3:
			print('NO')
		elif len(l1) == 1:
			print('YES')
			print(l1[0], end=' ')
			print(l1[0], end=' ')
			print(l1[0])
		else:
			print('YES')
			print(l1[0], end=' ')
			print(l1[1], end=' ')
			print('1')
except:
	pass


t = int(input())
while t:
	inp = [int(x) for x in input().split()]
	if inp.count(max(inp)) == 2:
		print('YES')
		print(str(max(inp)) + ' ' + str(min(inp)) + ' ' + '1')
	elif inp.count(max(inp)) == 3:
		print('YES')
		print(str(max(inp)) + ' ' + str(max(inp)) + ' ' + str(max(inp)))
	else:
		print('NO')
	t -= 1


def run():
	n = int(input())
	for i in range(n):
		num = list(map(int, input().split()))
		num.sort()
		if num[-1] != num[-2]:
			print('NO')
		else:
			print('YES')
			print(num[0], num[0], num[-1])
run()


ll = lambda : list(map(int, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
from datetime import datetime
from sys import stdin, stdout
for _ in range(ii()):
	(x, y, z) = v()
	l = [x, y, z]
	m = max(x, y, z)
	if l.count(m) < 2:
		print('NO')
	else:
		print('YES')
		print(m, min(l), min(l))


t = int(input())
for _ in range(t):
	lst = sorted(list(map(int, input().split())))
	if lst[-1] != lst[-2]:
		print('NO')
	elif lst[0] == lst[1] == lst[2]:
		print('YES')
		print(lst[0], lst[1], lst[2])
	else:
		a = lst[0]
		b = lst[2]
		c = lst[0]
		print('YES')
		print(a, b, c)


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	(a, b, c) = read_ints()
	if a == b:
		if a < c:
			print('NO')
		else:
			print('YES')
			print(a, c, c)
	elif a == c:
		if a < b:
			print('NO')
		else:
			print('YES')
			print(b, a, b)
	elif b == c:
		if b < a:
			print('NO')
		else:
			print('YES')
			print(a, a, b)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	a.sort()
	(x, y, z) = a
	if x <= y and y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
import random
import re
import heapq
t = int(input())
while t > 0:
	t -= 1
	(a, b, c) = map(int, input().split())
	if a == c and b <= a:
		print('YES')
		print(b, a, b)
	elif a == b and c < a:
		print('YES')
		print(c, a, c)
	elif b == c and a < b:
		print('YES')
		print(a, b, a)
	else:
		print('NO')


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans
for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = sorted([x, y, z])
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[2])


import itertools
for _ in range(int(input())):
	xyz = [int(i) for i in input().split()]
	(x, y, z) = xyz
	if x < y:
		c = y
		if y == z:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
	elif x > y:
		b = x
		if x == z:
			print('YES')
			print(y, x, y)
		else:
			print('NO')
	elif x == y:
		if x > z:
			a = x
			print('YES')
			print(x, z, z)
		elif x < z:
			print('NO')
		elif x == z:
			print('YES')
			print(x, x, x)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	(x, y, z) = Ri()
	s = set([x, y, z])
	lis = [x, y, z]
	lis.sort()
	if len(s) == 3 or (len(s) == 2 and lis[0] == lis[1]):
		NO()
	else:
		YES()
		print(lis[-1], lis[-3], lis[-3])


tests = int(input())
for test in range(tests):
	(x, y, z) = sorted(map(int, input().split()))
	if y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	li = list(map(int, input().split()))
	s = set(li)
	if len(s) == 1:
		print('YES')
		print(li[0], end=' ')
		print(li[0], end=' ')
		print(li[0])
	elif len(s) == 2:
		li.sort()
		if li[1] == li[0]:
			print('NO')
		else:
			print('YES')
			print(li[0], end=' ')
			print(li[0], end=' ')
			print(li[2], end=' ')
			print()
	else:
		print('NO')


for i in range(int(input())):
	d = list(map(int, input().split()))
	if d[0] == d[2] and d[2] > d[1]:
		print('YES')
		print(d[0], d[1], d[1])
	elif d[0] == d[1] and d[1] > d[2]:
		print('YES')
		print(d[0], d[2], d[2])
	elif d[1] == d[2] and d[1] > d[0]:
		print('YES')
		print(d[1], d[0], d[0])
	elif d[1] == d[2] == d[0]:
		print('YES')
		print(d[0], d[1], d[2])
	else:
		print('NO')


for i in range(int(input())):
	lst = list(map(int, input().split()))
	maxx = max(lst)
	minn = min(lst)
	if lst.count(maxx) >= 2:
		print('YES')
		print(maxx, minn, minn)
	else:
		print('NO')


s = int(input())
for i in range(s):
	m = [int(i) for i in input().split()]
	(a, b, c) = (m[0], m[1], m[2])
	if b == c and a <= b:
		print('YES')
		print(b, a, a)
	elif a == c and b <= a:
		print('YES')
		print(a, b, b)
	elif a == b and c <= a:
		print('YES')
		print(b, c, c)
	else:
		print('NO')


import sys, math, cmath, time
start_time = time.time()

def solve():
	(x, y, z) = sorted(invr())
	if y == z:
		print('YES')
		print(1, x, y)
	else:
		print('NO')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


n = int(input())
for i in range(n):
	(x, y, z) = input().split(' ')
	(x, y, z) = (int(x), int(y), int(z))
	l = [x, y, z]
	l.sort()
	if l[1] == l[2]:
		print('Yes')
		print(l[0], l[0], l[2])
	else:
		print('No')


t = int(input())
a = []
for i in range(t):
	a.append(input().split())
for i in a:
	for j in range(3):
		i[j] = int(i[j])
	max_val = max(i)
	if i.count(max(i)) == 2:
		print('YES')
		print(max(i), min(i), min(i))
	elif i.count(max(i)) == 3:
		print('YES')
		print(max(i), max(i), max(i))
	else:
		print('NO')


import sys, math, random
inp = sys.stdin.read().split()
inp = [int(i) for i in inp]
t = inp[0]
inp.remove(t)
for i in range(t):
	lst = inp[i * 3:(i + 1) * 3]
	lst.sort()
	n = 0
	if lst.count(lst[-1]) >= 2:
		n = 1
	if n == 0:
		print('NO')
	else:
		print('YES')
		print(1, lst[0], lst[-1])


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		continue
	if x != y and y != z and (z != x):
		print('NO')
		continue
	if x == y and x > z:
		print('YES')
		print(x, z, z)
		continue
	if y == z and y > x:
		print('YES')
		print(x, x, y)
		continue
	if z == x and z > y:
		print('YES')
		print(y, z, y)
		continue
	else:
		print('NO')
		continue


t = int(input())
while t > 0:
	t -= 1
	abc = [int(i) for i in input().split()]
	abc = sorted(abc, reverse=True)
	if abc[0] == abc[1]:
		print('YES')
		print(abc[0], abc[2], abc[2])
	else:
		print('NO')


def read_int():
	return int(input().strip())

def read_ints():
	return list(map(int, input().strip().split(' ')))

def solve():
	(x, y, z) = xyz = read_ints()
	for a in xyz:
		for b in xyz:
			for c in xyz:
				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 = read_int()
for _ in range(T):
	solve()


from collections import Counter
from math import ceil, gcd, log, log2
for _ in range(int(input())):
	arr = [int(x) for x in input().split()]
	if len(set(arr)) == 1:
		print('YES')
		print(arr[0], arr[0], arr[0])
	else:
		arr = sorted(arr)
		if arr[0] == arr[1]:
			print('NO')
		elif arr[-1] == arr[1]:
			print('YES')
			print(arr[0], arr[0], arr[-1])
		elif arr[0] < arr[1] < arr[2]:
			print('NO')
		elif arr[-1] > arr[0] and arr[-1] > arr[1]:
			print('YES')
			print(arr[0], arr[0], arr[2])
		else:
			print('NO')


t = int(input())
while t > 0:
	a = list(map(int, input().split()))
	maxx = max(a)
	minn = min(a)
	count = a.count(maxx)
	if count >= 2:
		print('YES')
		print(minn, minn, maxx)
	else:
		print('NO')
	t -= 1


for i in range(int(input())):
	lst = list(map(int, input().split()))
	mx = max(lst)
	lst.remove(mx)
	mx2 = max(lst)
	mx3 = min(lst)
	if mx == mx2:
		print('YES')
		print(mx, mx3, mx3)
	else:
		print('NO')


def call(l):
	x = y = z = 0
	if l[0] <= 0 or l[1] <= 0 or l[2] <= 0:
		j = 'No'
		k = ''
	elif l[0] != l[1] and l[2] != l[1] and (l[0] != l[2]):
		j = 'No'
		k = ''
	elif l[0] == l[1] and l[2] == l[1] and (l[0] == l[2]):
		j = 'yes'
		x = str(l[0])
		k = x + ' ' + x + ' ' + x
	else:
		x = str(l[2])
		if l[2] != l[1]:
			j = 'No'
			k = ''
			return (j, k)
		else:
			y = str(l[0])
			z = str(l[0])
		j = 'Yes'
		k = x + ' ' + y + ' ' + z
	return (j, k)
t = int(input())
p = []
for i in range(t):
	l = sorted(map(int, input().split()))
	p.append(call(l))
for i in range(len(p)):
	print(p[i][0])
	if p[i][0] == 'No':
		continue
	else:
		print(p[i][1])


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	a = list(read())
	a.sort(reverse=True)
	if a[0] != a[1]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[-1], a[-1])
for _ in range(int(input())):
	solve()


def solve(x, y, z):
	a = [x, y]
	b = [x, z]
	c = [y, z]
	for a1 in a:
		for b1 in b:
			for c1 in c:
				temp1 = max(a1, b1)
				temp2 = max(a1, c1)
				temp3 = max(b1, c1)
				if temp1 == x and temp2 == y and (temp3 == z):
					print('YES')
					print(a1, b1, c1)
					return
	print('NO')
	return
test_cases = int(input())
for case in range(test_cases):
	(x, y, z) = map(int, input().split())
	solve(x, y, z)


for t in range(int(input())):
	(x, y, z) = map(int, input().split(' '))
	a = max(x, y, z)
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print(x, y, z)
	elif a == x and a == y or (a == y and a == z) or (a == z and a == x):
		print('YES')
		if x != a:
			print(a, x, 1)
		elif y != a:
			print(a, y, 1)
		else:
			print(a, z, 1)
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().strip()
for _ in range(int(input())):
	(x, y, z) = sorted((int(x) for x in input().split()))
	print('NO' if y != z else f'YES\n{x} {y} 1')


t = int(input())
for t1 in range(t):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	q = 0
	for j in range(len(l)):
		if l[j] == max(x, y, z):
			q += 1
	if q > 1:
		n = max(x, y)
		a = n
		b = min(x, y, z)
		c = 1
		print('YES')
		print(*[a, b, c])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	ar = list(map(int, input().split()))
	ar.sort()
	(a, b, c) = ar
	if a <= b == c:
		print('YES')
		print(c, a, a)
	else:
		print('NO')


for i in range(int(input())):
	l1 = list(map(int, input().split()))
	if l1.count(max(l1)) < 2:
		print('NO')
	elif l1.count(max(l1)) == 3:
		print('YES')
		for j in range(len(l1)):
			print(l1[j], end=' ')
		print('\n')
	elif l1.count(max(l1)) == 2:
		print('YES')
		if l1[0] == l1[1]:
			print(l1[0], end=' ')
			print(l1[2], end=' ')
			print(l1[2])
		if l1[0] == l1[2]:
			print(l1[0], end=' ')
			print(l1[1], end=' ')
			print(l1[1])
		if l1[2] == l1[1]:
			print(l1[1], end=' ')
			print(l1[0], end=' ')
			print(l1[0])


t = int(input())
for s in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		for i in range(3):
			print(x, end=' ')
	elif x == y and z < x:
		print('YES')
		print(z, end=' ')
		print(x, end=' ')
		print(z)
	elif y == z and x < y:
		print('YES')
		print(x, end=' ')
		print(x, end=' ')
		print(z)
	elif x == z and y < x:
		print('YES')
		print(z, end=' ')
		print(y, end=' ')
		print(y)
	else:
		print('NO')
	print()


def valid(x, y, z, a, b, c):
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		print('YES')
		print(a, b, c)
		return True
	return False

def doTest():
	(x, y, z) = [int(each) for each in input().split(' ')]
	if x == y:
		if valid(x, y, z, x, z, 1):
			return
	if x == y:
		if valid(x, y, z, x, 1, z):
			return
	if True:
		if valid(x, y, z, x, z, y):
			return
	if y == z:
		if valid(x, y, z, x, 1, z):
			return
	if x == z:
		if valid(x, y, z, y, x, 1):
			return
	if True:
		if valid(x, y, z, y, x, z):
			return
	if x == z:
		if valid(x, y, z, 1, x, y):
			return
	if y == z:
		if valid(x, y, z, 1, x, y):
			return
	print('NO')

def main():
	T = int(input())
	for t in range(T):
		doTest()
main()


t = int(input())
while t > 0:
	li = list(map(int, input().split(' ')))
	if li[0] != li[1] and li[1] != li[2] and (li[0] != li[2]):
		print('NO')
	elif li[0] == li[1] == li[2]:
		print('YES')
		print(li[0], li[1], li[2])
	elif li.count(max(li)) == 2:
		print('YES')
		print(max(li), min(li), 1)
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = max(x, y, z)
	l = list()
	l.append(x)
	l.append(y)
	l.append(z)
	c = 0
	for i in l:
		if i == a:
			c = c + 1
	if c >= 2:
		print('YES')
		b = min(x, y, z)
		c = min(x, y, z)
		print(a, b, c)
	else:
		print('NO')


for ty in range(int(input())):
	a1 = input().split()
	a = []
	for ij in a1:
		a += [int(ij)]
	a.sort()
	if a[0] != a[1] and a[1] != a[2]:
		print('NO')
	elif a[0] == a[1] and a[1] != a[2]:
		print('NO')
	elif a[0] != a[1]:
		print('YES')
		print(str(a[2]) + ' ' + str(a[0]) + ' ' + str(1))
	else:
		print('YES')
		print(str(a[2]) + ' ' + str(a[2]) + ' ' + str(a[2]))


for tc in range(int(input())):
	(x, y, z) = input().split(' ')
	(x, y, z) = (int(x), int(y), int(z))
	A = sorted([x, y, z])
	if A[1] == A[2]:
		print('YES')
		print(A[0], A[0], A[1])
	else:
		print('NO')


from math import *
from collections import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	(x, y, z) = map(int, input().split())
	ch = max(x, y, z)
	ch1 = min(x, y, z)
	if x == y == z:
		print('YES')
		print(x, y, z)
		continue
	if [x, y, z].count(ch) <= 1:
		print('NO')
		continue
	if [x, y, z].count(ch1) >= 2:
		print('NO')
		continue
	print('YES')
	print(ch, ch1, ch1)


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	a = max(x, y, z)
	if l.count(a) < 2:
		print('NO')
	else:
		print('YES')
		print(a, min(l), min(l))
	t = t - 1


import sys
from collections import defaultdict

def get_ints():
	return map(int, I().split())

def get_list():
	return list(map(int, I().split()))

def I():
	return sys.stdin.readline().strip()
for t in range(int(I())):
	(x, y, z) = get_ints()
	mx = max(z, max(x, y))
	mn = min(z, min(x, y))
	count = 0
	if mx == x:
		count += 1
	if mx == y:
		count += 1
	if mx == z:
		count += 1
	if count == 1:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	k = [x, y, z]
	k.sort(reverse=True)
	if k[0] != k[1]:
		print('NO')
		continue
	elif not (1 <= k[0] and k[0] <= 1000000000.0):
		print('NO')
		continue
	elif not (1 <= k[1] and k[1] <= 1000000000.0):
		print('NO')
		continue
	else:
		print('YES\n{} {} {}'.format(k[0], k[2], k[2]))


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	flag = 0
	if x == y and z <= x:
		flag = 1
		print('YES')
		print(z, z, x)
	elif x == z and y < x:
		flag = 1
		print('YES')
		print(y, z, y)
	elif y == z and x < z:
		flag = 1
		print('YES')
		print(y, x, x)
	if flag == 0:
		print('NO')


tharsh = int(input())
for i in range(tharsh):
	l = list(map(int, input().split()))
	if l[0] == l[1] and l[2] <= l[0]:
		print('YES')
		print(l[0], end=' ')
		print(l[2], end=' ')
		print(1)
	elif l[0] == l[2] and l[1] <= l[0]:
		print('YES')
		print(l[0], end=' ')
		print(l[1], end=' ')
		print(1)
	elif l[1] == l[2] and l[0] <= l[1]:
		print('YES')
		print(l[1], end=' ')
		print(l[0], end=' ')
		print(1)
	else:
		print('NO')


for _ in range(int(input())):
	arr = [int(c) for c in input().split()]
	arr.sort()
	if arr[-1] != arr[-2]:
		print('NO')
	else:
		print('YES')
		arr[-1] = 1
		print(*arr)


n = int(input())
cases = [list(map(int, input().split())) for _ in range(n)]
for case in cases:
	(x, y, z) = case
	(a, b, c) = (None, None, None)
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == z and y < x:
		(a, b) = (x, y)
	elif x == y and z < x:
		(a, b) = (x, z)
	elif z == y and x < y:
		(a, b) = (z, x)
	else:
		print('NO')
	if a and b:
		if b - 1 == 0:
			c = 1
		else:
			c = b - 1
		print('YES')
		print(a, b, c)


t = int(input())
for _ in range(0, t):
	(a, b, c) = map(int, input().split())
	max1 = max(max(a, b), c)
	min1 = min(min(a, b), c)
	if a == max1 and b == max1 or (b == max1 and c == max1) or (a == max1 and c == max1):
		print('YES')
		print(max1, min1, min1)
	else:
		print('NO')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		a = l[2]
		b = l[0]
		c = b
		print('YES')
		print(a, b, c)


t = int(input())
for _ in range(t):
	A = list(map(int, input().split()))
	if max(A[0], A[1]) == max(A[1], A[2]) and max(A[1], A[2]) == max(A[2], A[0]):
		a = str(max(A))
		b = str(min(A))
		print('YES')
		print(a + ' ' + b + ' ' + b)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if a == b and c < b or (a == c and b < c) or (b == c and a < c):
		r = max(a, b, c)
		f = min(a, b, c)
		print('YES')
		print(r, f, 1)
	elif a == b and b == c:
		print('YES')
		print(a, b, c)
	elif a == b and c > b or (a == c and b > c) or (b == c and a > c):
		print('NO')
	if a != c and a != b and (b != c):
		print('NO')


t = int(input())
for i in range(t):
	l = list(map(int, str(input()).split()))
	s = 0
	l.sort()
	for i in range(3):
		s += l.count(l[i])
	if s == 3:
		print('No')
	elif s == 9:
		print('Yes')
		a = l[2]
		b = l[0]
		c = l[0]
		tex = str(a) + ' ' + str(b) + ' ' + str(c)
		print(tex)
	elif s == 5 and l[0] != l[1]:
		print('Yes')
		a = l[2]
		b = l[0]
		c = 1
		tex = str(a) + ' ' + str(b) + ' ' + str(c)
		print(tex)
	elif s == 5 and l[0] == l[1]:
		print('No')


t = int(input())
for _ in range(t):
	list1 = sorted(list(map(int, input().split())))
	if len(set(list1)) == 1:
		print('YES')
		print(*list1)
	elif len(set(list1)) == 2 and list1[1] > list1[0]:
		list1[1] = 1
		print('YES')
		print(*list1)
	else:
		print('NO')


def get_pairwise(arr):
	arr.sort()
	if arr[2] != arr[1]:
		return []
	return [arr[2], arr[0], 1] if arr[2] != arr[0] else [arr[2]] * 3
for _ in range(int(input())):
	nums = list(map(int, input().split()))
	result = get_pairwise(nums)
	if len(result) == 0:
		print('NO')
	else:
		print('YES')
		print(' '.join(map(str, result)))


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


cnt = int(input())
for _ in range(cnt):
	arr = list(map(int, input().split()))
	[x, y, z] = sorted(arr)
	if x <= y and y == z:
		print('yes')
		print(y, x, x)
	else:
		print('NO')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	t = iia()
	if t.count(max(t)) >= 2:
		print('YES')
		if t[0] == t[2]:
			b = t[0]
			a = c = t[1]
		elif t[1] == t[2]:
			c = t[2]
			a = b = t[0]
		else:
			a = t[0]
			b = c = t[2]
		print(a, b, c)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	list = [x, y, z]
	ans = max(x, y, z)
	c = min(x, y, z)
	if c == 1:
		b = 1
	else:
		b = c - 1
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif list.count(ans) >= 2:
		print('YES')
		print(ans, c, b)
	else:
		print('NO')


from collections import defaultdict as dd
for _ in range(int(input())):
	lst = list(map(int, input().split()))
	lst.sort()
	for i in range(1):
		if lst[i] == lst[i + 1] and lst[i + 1] == lst[i + 2]:
			print('YES')
			print(lst[i], lst[i + 1], lst[i + 2])
		elif lst[i] != lst[i + 1] and lst[i + 1] == lst[i + 2]:
			print('YES')
			print(lst[i], lst[i], lst[i + 1])
		else:
			print('NO')


t = int(input())
for _ in range(t):
	v = list(map(int, input().split()))
	s = set(v)
	if len(s) == 3 or v.count(min(v)) == 2:
		print('NO')
	else:
		print('YES')
		if len(s) == 1:
			print(f'{v[0]} {v[0]} {v[0]}')
		else:
			print(f'{max(v)} {min(v)} {min(v)}')


from collections import Counter
testCases = int(input())
for t in range(testCases):
	nums = list(map(int, input().split(' ')))
	largest = max(nums)
	c_nums = Counter(nums)
	if c_nums[largest] < 2:
		print('NO')
	else:
		second = sorted(c_nums.keys())[0]
		print('YES')
		print(largest, second, second)


t = int(input())
while t:
	t -= 1
	(a, b, c) = map(int, input().split())
	l = []
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	if l[0] == l[1] and l[1] != l[2] or (l[0] != l[1] and l[1] != l[2]):
		print('NO')
	elif l[0] == l[1] and l[1] == l[2]:
		print('YES\n')
		print(l[0], l[1], l[2])
	else:
		print('YES\n')
		print(l[0], l[1], 1)


import sys
input = sys.stdin.readline
for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif (x == y and y != z) and max(x, z) == x:
		print('YES')
		print(1, x, z)
	elif (x == z and y != z) and max(x, y) == x:
		print('YES')
		print(1, x, y)
	elif (y == z and y != x) and max(y, x) == y:
		print('YES')
		print(1, y, x)
	else:
		print('NO')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	l = list(map(int, sys.stdin.readline().split()))
	l.sort()
	if l[-1] == l[-2]:
		print('YES')
		print(l[-1], l[0], 1)
	else:
		print('NO')


for i in range(int(input())):
	m = list(map(int, input().split()))
	if m.count(max(m)) > 1:
		print('Yes')
		print(max(m), min(m), 1)
	else:
		print('No')


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


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and z <= x:
		print('YES')
		print(x, z, z)
	elif y == z and x <= z:
		print('YES')
		print(y, x, x)
	elif x == z and y <= z:
		print('YES')
		print(x, y, y)
	else:
		print('NO')


for s in [*open(0)][1:]:
	(x, y, z) = sorted(map(int, s.split()))
	print(*(['YES', x, x, y], ['NO'])[z > y])


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return
mod = 10 ** 9 + 7

def solve():
	li = L()
	(x, y, z) = (li[0], li[1], li[2])
	li.sort()
	mx = max(li)
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y and x == mx:
		print('YES')
		print(x, z, 1)
	elif y == z and y == mx:
		print('YES')
		print(y, x, 1)
	elif x == z and x == mx:
		print('YES')
		print(x, y, 1)
	else:
		print('NO')
t = II()
for i in range(t):
	solve()


n = int(input())
for i in range(n):
	arr = list(map(int, input().split()))
	x = max(arr)
	x1 = min(arr)
	y = arr.count(x)
	if y >= 2:
		print('YES')
		if x1 == 1:
			print(x1, x1, x)
		else:
			print(x1, x1 - 1, x)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	[x, y, z] = a
	a.sort(reverse=True)
	if not (a[0] == a[1] and a[1] >= a[2]):
		print('NO')
	else:
		print('YES')
		print(a[0], end=' ')
		print(a[2], end=' ')
		print(1)


import sys
n = int(input())
for _ in range(n):
	(x, y, z) = map(int, sys.stdin.readline().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		continue
	if x != y and x != z and (y != z):
		print('NO')
		continue
	max1 = max(x, y, z)
	if x == y and max1 != x:
		print('NO')
		continue
	if z == y and max1 != z:
		print('NO')
		continue
	if x == z and max1 != x:
		print('NO')
		continue
	if x == y:
		print('YES')
		print(x, z, z)
		continue
	if x == z:
		print('YES')
		print(y, x, y)
		continue
	if z == y:
		print('YES')
		print(x, x, y)
		continue


for i in range(int(input())):
	l = sorted(list(map(int, input().split())))
	(a, b, c) = (l[0], l[1], l[2])
	if a <= b and b < c:
		print('NO')
	else:
		print('YES')
		print(a, a, c)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[2], l[0], l[0])


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		[x, y, z] = inlt()
		if x == y and min(x, y, z) != x:
			print('Yes')
			c = z
			b = z
			a = x
			pr_list([a, b, c])
		elif x == z and min(x, y, z) != x:
			print('Yes')
			c = y
			b = z
			a = y
			pr_list([a, b, c])
		elif y == z and min(x, y, z) != y:
			print('Yes')
			a = x
			b = x
			c = y
			pr_list([a, b, c])
		elif y == z and x == y:
			print('Yes')
			pr_list([x, y, z])
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	a = (x, y, z) = sorted(list(map(int, input().split())))
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(a[0], a[0], a[2])


__author__ = 'shukkkur'
t = int(input())
yes = 'YES'
no = 'NO'
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x >= z:
		print(yes)
		a = x
		b = c = z
		print(a, b, c)
	elif x == z and x >= y:
		print(yes)
		a = x
		b = c = y
		print(a, b, c)
	elif y == z and y >= x:
		print(yes)
		a = y
		b = c = x
		print(a, b, c)
	else:
		print(no)


def hey(x, y, z):
	if x != y != z != x or z > x == y or y > x == z or (x > y == z):
		print('NO')
	else:
		print('YES\n{} {} {}'.format(min(x, y), min(x, z), min(y, z)))
test_cases = int(input())
for t in range(test_cases):
	(x, y, z) = input().split(' ')
	hey(int(x), int(y), int(z))


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(x, y, z) = inputnums()
	a = [x, y, z]
	a.sort()
	if a[2] == a[1]:
		print('YES')
		print(a[2], a[0], a[0])
	else:
		print('NO')


for z in range(int(input())):
	a = list(map(int, input().split()))
	a.sort()
	if a[0] < a[1] and a[1] < a[2]:
		print('NO')
	elif a[0] == a[1] and a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[0])
	elif a[0] == a[1]:
		print('NO')
	elif a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[1])


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	if len(set(arr)) == 1:
		print('YES')
		print(*arr)
	elif len(set(arr)) == 3:
		print('NO')
	else:
		arr.sort()
		if arr.count(max(arr)) < 2:
			print('NO')
		else:
			print('YES')
			print(arr[-1], arr[0], arr[0])


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	x = max(a, b, c)
	if x == a == b == c:
		print('YES')
		print(x, x, x)
	elif x == a == b:
		print('YES')
		print(x, 1, c)
	elif x == a == c:
		print('YES')
		print(1, x, b)
	elif x == b == c:
		print('YES')
		print(a, 1, x)
	else:
		print('NO')


def solve(a, b, c):
	l = [a, b, c]
	ans = []
	if len(set(l)) < 3:
		if len(set(l)) == 1:
			ans = l
		elif l.count(max(l)) == 2:
			ans = [max(l), min(l), min(l)]
	if ans:
		print('YES')
		print(' '.join(list(map(str, ans))))
	else:
		print('NO')

def loop():
	t = int(input())
	for _ in range(t):
		(a, b, c) = map(int, input().split())
		solve(a, b, c)
loop()


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len({x, y, z}) == 3:
		print('NO')
		continue
	if len({x, y, z}) == 1:
		print('YES')
		print(x, y, z)
		continue
	(a, b, c) = (1, 1, 1)
	if x == y:
		if z > x:
			print('NO')
			continue
		a = x
		b = z
	elif x == z:
		if y > x:
			print('NO')
			continue
		b = x
		a = y
	else:
		if x > y:
			print('NO')
			continue
		c = y
		a = x
	print('YES')
	print(a, b, c)


import math
t = int(input())
for w in range(t):
	(x, y, z) = (int(i) for i in input().split())
	s = set([x, y, z])
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(x, x, x)
	else:
		l = [x, y, z]
		k = max(l)
		if l.count(k) == 2:
			print('YES')
			print(1, k, min(l))
		else:
			print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and x != z and (x == min(x, z)):
		print('NO')
	elif y == z and y != x and (y == min(y, x)):
		print('NO')
	elif x == z and x != y and (x == min(y, z)):
		print('NO')
	else:
		print('YES')
		print(min({x, y, z}), min({x, y, z}), max({x, y, z}))


Q = int(input())
for q in range(Q):
	(x, y, z) = map(int, input().split())
	L = [x, y, z]
	L.sort()
	if L[1] == L[2]:
		if x == y and y == z:
			print('YES')
			print(x, x, x)
		else:
			print('YES')
			if x == y:
				print(z, x, z)
			elif y == z:
				print(x, x, z)
			else:
				print(x, y, y)
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	a.sort()
	if a.count(a[-1]) == 1:
		print('NO')
	else:
		print('YES')
		print(a[-1], a[0], a[0])


for i in range(int(input())):
	m = [int(a) for a in input().split()]
	m = sorted(m)
	if m[2] != m[1]:
		print('NO')
		continue
	print('YES')
	print(m[0], m[0], m[2])


t = int(input())
for i in range(t):
	is_available = False
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	arr1 = [x, y, z]
	arr1.sort()
	k = arr1[0]
	l = arr1[1]
	m = arr1[2]
	if k < l < m:
		print('NO')
	elif k == l == m:
		print('YES')
		print(k, k, k)
	elif k == l < m:
		print('NO')
	elif k < l == m:
		print('YES')
		print(k, k, l)


import collections
t = int(input())
for q in range(0, t):
	(x, y, z) = map(int, input().split())
	d = collections.Counter([x, y, z])
	m = max(x, y, z)
	if d[m] >= 2:
		print('YES')
		print(m, min(x, y, z), 1)
	else:
		print('NO')


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(x, y, z):
	if x > max(y, z) or y > max(x, z) or z > max(y, x):
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
for t in range(0, tests):
	(x, y, z) = list(map(int, readline().rstrip('\n').split(' ')))
	solve(x, y, z)


import sys
import bisect as bi
import math
from collections import defaultdict as dd
input = sys.stdin.readline

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for _ in range(inin()):
	(a, b, c) = cin()
	if a == b and c <= a:
		print('YES')
		print(a, c, c)
	elif b == c and a <= c:
		print('YES')
		print(a, a, b)
	elif c == a and b <= c:
		print('YES')
		print(b, a, b)
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x == y == z:
		print('YES')
		print(x, x, x)
		continue
	l = [x, y, z]
	l.sort()
	if l[0] == l[1]:
		print('NO')
		continue
	else:
		print('Yes')
		print(l[0], l[0], l[1])


t = int(input())
for i in range(t):
	lst = list(map(int, input().split()))
	lst1 = list(set(lst))
	mn = lst.count(min(lst))
	mx = lst.count(max(lst))
	if mn == 2:
		print('NO')
	elif len(lst) == len(lst1):
		print('NO')
	else:
		print('YES')
		print(min(lst), min(lst), max(lst))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	maxi = max(x, y, z)
	if x == z == y:
		print('YES')
		print('{0} {1} {2}'.format(x, y, z))
	elif maxi == x == y or maxi == x == z or maxi == z == y:
		print('YES')
		print('{0} {1} {2}'.format(maxi, min(x, y, z), 1))
	else:
		print('NO')


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	(x, y, z) = sorted(MAP())
	if y != z:
		print('NO')
	else:
		print('YES')
		print(min(x, y), min(y, z), min(x, z))
for _ in range(IN()):
	case()


t = int(input())
res = []
while t:
	t -= 1
	strng = list(map(int, input().split()))
	x = strng[0]
	y = strng[1]
	z = strng[2]
	if x == y == z:
		res.append(['YES', str(x) + ' ' + str(y) + ' ' + str(z)])
	elif x == y and x > z:
		res.append(['YES', str(z) + ' ' + str(z) + ' ' + str(x)])
	elif x == z and x > y:
		res.append(['YES', str(y) + ' ' + str(y) + ' ' + str(z)])
	elif y == z and y > x:
		res.append(['YES', str(x) + ' ' + str(x) + ' ' + str(z)])
	else:
		res.append(['NO'])
for i in res:
	for j in i:
		print(j)


for _ in range(int(input())):
	l = [int(x) for x in input().split()]
	if l.count(max(l)) >= 2:
		print('YES')
		print('{} {} {}'.format(max(l), min(l), min(l)))
	else:
		print('NO')


for _ in range(int(input())):
	nm = list((int(i) for i in input().split()))
	if len(nm) == len(set(nm)):
		print('NO')
	elif nm[0] == nm[2] != nm[1]:
		if nm[1] < nm[0] and nm[1] < nm[2]:
			print('YES')
			print(min(nm), max(nm), min(nm))
		else:
			print('NO')
	elif nm[1] == nm[2] != nm[0]:
		if nm[0] < nm[1] and nm[0] < nm[2]:
			print('YES')
			print(min(nm), min(nm), max(nm))
		else:
			print('NO')
	elif nm[0] == nm[1] != nm[2]:
		if nm[2] < nm[0] and nm[2] < nm[1]:
			print('YES')
			print(max(nm), min(nm), min(nm))
		else:
			print('NO')
	elif nm[0] == nm[1] == nm[2]:
		print('YES')
		print(*nm)


t = int(input())
for num in range(t):
	inp_string = input()
	inp_data = inp_string.split(' ')
	inp_data = [int(x) for x in inp_data]
	inp_data.sort()
	if inp_data[0] == inp_data[1] and inp_data[2] > inp_data[0]:
		print('NO')
	elif inp_data[0] < inp_data[1] and inp_data[1] < inp_data[2]:
		print('NO')
	elif inp_data[0] == inp_data[1] and inp_data[1] == inp_data[2]:
		print('YES')
		print(str(inp_data[0]) + ' ' + str(inp_data[0]) + ' ' + str(inp_data[0]))
	else:
		print('YES')
		print(str(inp_data[0]) + ' ' + str(inp_data[0]) + ' ' + str(inp_data[2]))


inputs_cnt = int(input())
for index in range(inputs_cnt):
	(x, y, z) = map(int, input().split())
	(v1, v2, v3) = sorted([x, y, z])
	if v2 != v3:
		print('NO')
	elif len({x, y, z}) == 1:
		print('YES')
		print(x, y, z)
	else:
		print('YES')
		(min_value, max_value) = sorted({x, y, z})
		print(min_value, min_value, max_value)


for _ in range(int(input())):
	li = list(map(int, input().split()))
	m = max(li)
	mi = min(li)
	if li.count(m) < 2:
		print('NO')
	elif li[0] == li[1] == li[2]:
		print('YES')
		print(*li)
	else:
		print('YES')
		if mi > 1:
			print(m, mi, mi - 1)
		else:
			print(m, mi, mi)


for u in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	if len(l) == len(set(l)):
		print('NO')
	else:
		l = [x, y, z]
		m = max(l)
		mm = min(l)
		if l.count(m) >= 2:
			print('YES')
			print(mm, mm, m)
		else:
			print('NO')


from collections import Counter
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
	elif len(set([x, y, z])) == 1:
		print('YES')
		print(*[x, y, z])
	else:
		arr = [x, y, z]
		arr.sort()
		ans = 'NO'
		if arr[0] == arr[1]:
			if arr[2] < arr[0]:
				(a, b, c) = (arr[0], arr[2], arr[2] - 1)
				if c <= 0:
					c = 1
				print('YES')
				print(*[a, b, c])
			else:
				print('NO')
		elif arr[1] == arr[2]:
			if arr[0] < arr[1]:
				(a, b, c) = (arr[0], arr[1], arr[0] - 1)
				if c <= 0:
					c = 1
				print('YES')
				print(*[a, b, c])
			else:
				print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = list(map(int, input().split()))
	if x != y and y != z and (z != x):
		print('NO')
	if x == y and x > z:
		print('YES')
		print('{0} {1} {2}'.format(x, z, z))
	if y == z and y > x:
		print('YES')
		print('{0} {1} {2}'.format(y, x, x))
	if z == x and z > y:
		print('YES')
		print('{0} {1} {2}'.format(x, y, y))
	if x == y and y == z and (z == x):
		print('YES')
		print('{0} {1} {2}'.format(x, z, y))
	if x == y and x < z:
		print('NO')
	if y == z and y < x:
		print('NO')
	if z == x and z < y:
		print('NO')


from sys import stdin
t = int(stdin.readline().strip())
for i in range(t):
	X = sorted(list(map(int, stdin.readline().strip().split(' '))), reverse=True)
	if X[0] != X[1]:
		print('NO')
	else:
		print('YES')
		print(X[0], X[2], 1)


for _ in range(int(input())):
	(x, y, z) = map(int, input().strip().split())
	lis = [x, y, z]
	if x != y and y != z and (x != z):
		print('NO')
	else:
		z = max(lis)
		if lis.count(z) > 1:
			print('YES')
			print(min(lis), min(lis), max(lis))
		else:
			print('NO')


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()


t = int(input())
for _ in range(t):
	n = list(map(int, input().split()))
	d = {}
	for x in n:
		if x in d:
			d[x] += 1
		else:
			d[x] = 1
	if len(d.keys()) == 3:
		print('NO')
	elif len(d.keys()) == 1:
		print('YES')
		for x in n:
			print(x, end=' ')
		print()
	elif d[min(n)] == 1:
		print('YES')
		print(min(n), min(n), max(n))
	else:
		print('NO')


t = int(input())
xyz = []
for tt in range(t):
	xyz_i = []
	xyz_i = input().split()
	for x in range(3):
		xyz_i[x] = int(xyz_i[x])
	xyz.append(xyz_i)
for i in range(t):
	(x, y, z) = (xyz[i][0], xyz[i][1], xyz[i][2])
	max_1 = max(x, y, z)
	xyz[i].remove(max_1)
	if max_1 == max(xyz[i]):
		xyz[i].append(max_1)
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))
		continue
	else:
		print('NO')


n = int(input())
list_of_testcases = []
for i in range(n):
	l = input().split()
	l = list(map(int, l))
	list_of_testcases.append(l)

def pairwise_max(list):
	x = list[0]
	y = list[1]
	z = list[2]
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		return None
	elif x == y and y > z:
		print('YES')
		print(x, z, z)
		return None
	elif x < y and y == z:
		print('YES')
		print(x, x, z)
		return None
	elif x == z and z > y:
		print('YES')
		print(y, x, y)
		return None
	else:
		print('NO')
		return None
for list in list_of_testcases:
	pairwise_max(list)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	a = max(l)
	b = min(l)
	cnt = 0
	if a == x and a == y or (a == x and a == z) or (a == y and a == z):
		cnt = 1
	if cnt > 0:
		print('YES')
		print(b, b, a)
	else:
		print('NO')


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


t = int(input())
for i in range(t):
	x = sorted(map(int, input().split()))
	if x[2] != x[1]:
		print('NO')
	else:
		print(f'YES\n{x[2]} {x[0]} {x[0]}')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	(a, c) = (max(x, y, z), 0)
	if x == a:
		c += 1
	if y == a:
		c += 1
	if z == a:
		c += 1
	if c >= 2:
		print('YES')
		if x == a:
			print(a, min(x, y, z), min(x, y, z))
		elif y == max(x, y, z):
			print(min(x, y, z), a, min(x, y, z))
		else:
			print(min(x, y, z), min(x, y, z), a)
	else:
		print('NO')


def Solve(arr):
	(a, b, c) = arr
	maxx = max(arr)
	if arr.count(maxx) < 2:
		print('NO')
		return
	if arr.count(maxx) == 3:
		print('YES')
		print(a, b, c)
		return
	print('YES')
	minn = min(a, b, c)
	print(maxx, minn, minn)
T = int(input())
for _ in range(T):
	arr = list(map(int, input().split()))
	Solve(arr)


try:

	def maximum(a, b, c):
		if a >= b and a >= c:
			largest = a
		elif b >= a and b >= c:
			largest = b
		else:
			largest = c
		return largest
	t = int(input())
	while t:
		l = list(map(int, input().split()))[:3]
		m = max(l)
		mi = min(l)
		if l.count(m) == 3:
			print('YES')
			print(*l)
			continue
		elif l.count(m) == 2:
			print('YES')
			print(str(m) + ' ' + str(mi) + ' ' + str(mi))
			continue
		else:
			print('NO')
			continue
except:
	pass


for j in range(int(input())):
	a = list(map(int, input().split()))
	if len(list(set(a))) == 1:
		print('YES')
		for i in a:
			print(i, end=' ')
		print()
	elif a.count(max(a)) > a.count(min(a)):
		print('Yes')
		for m in list(set(a)):
			print(m, end=' ')
		print('1')
	else:
		print('NO')


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


t = int(input())
for tt in range(0, t):
	(x, y, z) = map(int, input().split())
	s = ''
	if x == y and y == z:
		print('YES')
		s = f'{x} {x} {x}'
		print(s)
	elif x == y and x > z:
		print('YES')
		s = f'{x} {z} {z}'
		print(s)
	elif y == z and z > x:
		print('YES')
		s = f'{y} {x} {x}'
		print(s)
	elif x == z and x > y:
		print('YES')
		s = f'{x} {y} {y}'
		print(s)
	else:
		print('NO')


import collections
t = int(input())
for _ in range(t):
	n = list(map(int, input().split()))
	freq = collections.Counter(n)
	if freq[max(n)] >= 2:
		print('YES')
		(m, n) = (max(n), min(n))
		print(m, n, n)
	else:
		print('NO')


from math import *
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	l.sort()
	if l[1] == l[2]:
		print('YES')
		print(l[0], l[0], l[1])
	else:
		print('NO')


def counter(a, b, c):
	if a == b and b == c:
		return 3
	if a == b or b == c or a == c:
		return 2
	return 1
n = int(input())
for i in range(n):
	arr = list(map(int, input().split(' ')))
	ans = counter(arr[0], arr[1], arr[2])
	if ans == 1:
		print('NO')
		continue
	if ans == 3:
		print('YES')
		print(arr[0], arr[1], arr[2])
		continue
	if arr.count(max(arr)) == 2:
		print('YES')
		print(max(arr), min(arr), min(arr))
		continue
	else:
		print('NO')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	x = arr[0]
	y = arr[1]
	z = arr[2]
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x == y:
		if x > z:
			print('YES')
			print(x, z, z)
			continue
		print('NO')
		continue
	if x == z:
		if x > y:
			print('YES')
			print(y, z, y)
			continue
		print('NO')
		continue
	if y == z:
		if y > x:
			print('YES')
			print(x, x, y)
			continue
		print('NO')
		continue


t = int(input())
for i in range(t):
	abc = input().split()
	a = int(abc[0])
	b = int(abc[1])
	c = int(abc[2])
	if a == b and b == c:
		print('YES')
		print(a, a, a)
	elif a == b:
		if a > c:
			print('YES')
			print(a, c, c)
		else:
			print('NO')
	elif b == c:
		if b > a:
			print('YES')
			print(a, a, b)
		else:
			print('NO')
	elif a == c:
		if a > b:
			print('YES')
			print(b, a, b)
		else:
			print('NO')
	else:
		print('NO')


def read():
	return list(map(int, input().split()))

def solve():
	(x, y, z) = read()
	if x == y == z:
		print('YES')
		print(x, y, z)
		return
	if x == y:
		if z <= x:
			print('YES')
			print(x, z, z)
			return
	elif y == z:
		if x <= y:
			print('YES')
			print(x, x, y)
			return
	elif x == z:
		if y <= x:
			print('YES')
			print(y, x, y)
			return
	else:
		pass
	print('NO')
	return
t = int(input())
for i in range(1, t + 1):
	solve()


if 1 == 1:
	t = int(input())
	while t > 0:
		t = t - 1
		w = input().split()
		x = int(w[0])
		y = int(w[1])
		z = int(w[2])
		if x == y:
			if y == z:
				print('YES')
				print(x, x, x)
			elif y > z:
				print('YES')
				print(x, z, z)
			else:
				print('NO')
		elif y == z:
			if x == z:
				print('YES')
				print(x, x, x)
			elif y > x:
				print('YES')
				print(y, x, x)
			else:
				print('NO')
		elif x == z:
			if y == z:
				print('YES')
				print(x, x, x)
			elif y < x:
				print('YES')
				print(y, y, x)
			else:
				print('NO')
		else:
			print('NO')


def check(x, y, z):
	a = x
	if a > z:
		return 'NO'
	elif a == z:
		c = 1
	elif z > a:
		c = z
	if c > y:
		return 'NO'
	elif c == y:
		b = 1
	elif c < y:
		b = y
	if b > x:
		return 'NO'
	elif b == x:
		a = x
	elif b < x:
		a = x
	l = [a, b, c]
	return l
for i in range(int(input())):
	cq = list(map(int, input().split()))
	cq.sort()
	x = cq[0]
	y = cq[1]
	z = cq[2]
	if x == y and y == z and (z == x):
		xe = [x, y, z]
	else:
		xe = check(x, y, z)
	if xe == 'NO':
		print('NO')
	else:
		print('YES')
		print(*xe)


t = int(input())
for i in range(t):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	if x == y == z:
		print('YES')
		print(str(x) + ' ' + str(y) + ' ' + str(z))
	elif x == y == max(x, y, z) or x == z == max(x, y, z) or y == z == max(x, y, z):
		print('YES')
		print(str(max(x, y, z)) + ' ' + str(min(x, y, z)) + ' 1')
	else:
		print('NO')


for ele in range(int(input())):
	list = [int(num) for num in input().split()]
	i = max(list)
	if list.count(i) >= 2:
		j = min(list)
		print('YES')
		print(i, j, j)
	else:
		print('NO')


from sys import stdin

def main():
	l = stdin.read().splitlines()[1:]
	for (i, s) in enumerate(l):
		(x, y, z) = sorted(map(int, s.split()))
		l[i] = 'NO' if y < z else f'YES\n{x} {x} {z}'
	print('\n'.join(l))
main()


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max([x, y, z])
	arr = [x, y, z]
	if arr.count(m) < 2:
		print('NO')
		continue
	print('YES')
	if x != m:
		print(x, m, x)
	elif y != m:
		print(y, m, y)
	else:
		print(z, m, z)


t = int(input())
for i in range(t):
	a = [int(i) for i in input().split()]
	maxi = max(a)
	if a.count(maxi) > 1:
		print('YES')
		another = maxi
		for j in a:
			if j != maxi:
				another = j
		print(maxi, another, another)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	A = list(map(int, input().split()))
	B = set(A)
	if len(B) == 1:
		print('YES')
		for i in A:
			print(i, end=' ')
		print()
	elif len(B) == 2:
		if A.count(min(A)) != 2:
			print('YES')
			s = ''
			s += (str(min(A)) + ' ') * 2
			s += str(max(A))
			print(s)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for x in range(0, t):
	(a, m, c) = map(int, input().split())
	z = max(a, m, c)
	z1 = min(a, m, c)
	if z == a and z == m or (z == a and z == c) or (z == m and z == c):
		print('YES')
		l = [z, z1, z1]
		print(*l, sep=' ')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	k = 0
	if x == y == z:
		a = b = c = x
		k = 1
	elif x == y and x > z:
		a = x
		b = z
		c = z
		k = 1
	elif y == z and z > x:
		c = z
		a = x
		b = x
		k = 1
	elif x == z and x > y:
		b = z
		c = y
		a = y
		k = 1
	if k != 0:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	aa = [a, b, c]
	if a != b and b != c and (c != a):
		print('NO')
	else:
		mini = min(a, b, c)
		maxi = max(set(aa), key=aa.count)
		if maxi > mini:
			print('YES')
			print(maxi, mini, mini, end=' ')
		elif a == b and b == c and (c == a):
			print('YES')
			print(maxi, mini, mini, end=' ')
		else:
			print('NO')
		print()


from math import inf, log2

class SegmentTree:

	def __init__(self, array, func=max):
		self.n = len(array)
		self.size = 2 ** (int(log2(self.n - 1)) + 1) if self.n != 1 else 1
		self.func = func
		self.default = 0 if self.func != min else inf
		self.data = [self.default] * (2 * self.size)
		self.process(array)

	def process(self, array):
		self.data[self.size:self.size + self.n] = array
		for i in range(self.size - 1, -1, -1):
			self.data[i] = self.func(self.data[2 * i], self.data[2 * i + 1])

	def query(self, alpha, omega):
		if alpha == omega:
			return self.data[alpha + self.size]
		res = self.default
		alpha += self.size
		omega += self.size + 1
		while alpha < omega:
			if alpha & 1:
				res = self.func(res, self.data[alpha])
				alpha += 1
			if omega & 1:
				omega -= 1
				res = self.func(res, self.data[omega])
			alpha >>= 1
			omega >>= 1
		return res

	def update(self, index, value):
		index += self.size
		self.data[index] = value
		index >>= 1
		while index:
			self.data[index] = self.func(self.data[2 * index], self.data[2 * index + 1])
			index >>= 1
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	(x, y, z) = map(int, input().split())
	s = sorted([x, y, z])
	if s[1] == s[2]:
		print('YES')
		print(s[0], s[0], s[1])
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	a.sort()
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		print(f'{a[0]} {a[0]} {a[2]}')


t = int(input())
while t:
	t -= 1
	(x, y, z) = sorted(map(int, input().split()), reverse=True)
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		print('YES')
		print(x, z, z)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	st = set([x, y, z])
	mx = max(x, y, z)
	mn = min(x, y, z)
	if (x, y, z).count(mx) >= 2:
		print('YES')
		cnt = (x, y, z).count(mx)
		if cnt == 3:
			print(*[mx] * 3)
		else:
			print(*[mn] * cnt + (3 - cnt) * [mx])
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(p, q, r) = map(int, input().split())
	if p == q and q == r:
		print('YES')
		print(p, end=' ')
		print(q, end=' ')
		print(r)
	elif p == q and r < p:
		print('YES')
		print(r, end=' ')
		print(q, end=' ')
		print(r)
	elif q == r and p < q:
		print('YES')
		print(p, end=' ')
		print(p, end=' ')
		print(r)
	elif p == r and q < p:
		print('YES')
		print(q, end=' ')
		print(q, end=' ')
		print(r)
	else:
		print('NO')


x = int(input())
for i in range(0, x):
	m = list(map(int, input().split()))[:3]
	m.sort()
	if m[1] == m[2]:
		print('YES')
		print(m[0], m[0], m[1])
	else:
		print('NO')


from itertools import permutations

def ans(x, y, z):
	old_xyz = [x, y, z]
	if len(set([x, y, z])) == 1:
		print('YES')
		print(x, x, x)
		return
	if len(set([x, y, z])) == 3:
		print('NO')
		return
	l = sorted([x, y, z])
	[x, y, z] = l
	if x == y:
		print('NO')
		return
	assert y == z
	for (a, b, c) in permutations([x, z, x]):
		if [max(a, b), max(a, c), max(b, c)] == old_xyz:
			print('YES')
			print(a, b, c)
			return
	assert False
T = int(input())
for _ in range(T):
	(x, y, z) = input().split(' ')
	x = int(x)
	y = int(y)
	z = int(z)
	ans(x, y, z)


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	(x, y, z) = listIn()
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == z:
		if y < x:
			print('YES')
			print(y, x, y)
		else:
			print('NO')
	elif x == y:
		if z < x:
			print('YES')
			print(x, z, z)
		else:
			print('NO')
	elif x < y:
		print('YES')
		print(x, x, y)
	else:
		print('NO')


t = int(input())
for i in range(t):
	ar = list(map(int, input().split()))[:3]
	ar.sort()
	if ar[1] != ar[2]:
		print('NO')
	else:
		print('YES')
		print('1', ar[0], ar[1])


from collections import defaultdict
from collections import Counter
from sys import setrecursionlimit as srl
srl(2 * 10 ** 6)

def solve(x, y, z):
	ans = []
	if z == max(x, y):
		print('YES')
		return [z, min(x, y), min(x, y)]
	elif x == y and z < x:
		print('YES')
		return [x, z, z]
	else:
		return ['NO']
t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	print(*solve(x, y, z))
	t -= 1


from sys import stdin

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	(x, y, z) = minput()
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if z > x:
			print('NO')
		else:
			a = c = z
			b = y
			print('YES')
			print(a, b, c)
	elif y == z:
		if x < y:
			a = b = x
			c = z
			print('YES')
			print(a, b, c)
		else:
			print('NO')
	elif x == z:
		if y > x:
			print('NO')
		else:
			a = x
			b = c = y
			print('YES')
			print(a, b, c)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	a = [x, y, z]
	s = set(a)
	if len(s) <= 2:
		if len(s) == 1:
			print('YES')
			print(x, y, z)
		elif len(s) == 2:
			if x == y and x > z:
				print('YES')
				print(x, z, z)
			elif x == z and x > y:
				print('YES')
				print(x, y, y)
			elif y == z and y > x:
				print('YES')
				print(y, x, x)
			else:
				print('NO')
	else:
		print('NO')


import os
import sys
import time
from io import BytesIO, IOBase

def localInput():
	sys.stdin = open('inputf.in', 'r')
	sys.stdout = open('outputf.in', 'w')
	sys.stderr = open('error.txt', 'w')

def print_to_stderr(*a):
	print(*a, file=sys.stderr)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]

def solve():
	arr = [int(a) for a in input().strip().split(' ')]
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
	elif arr[0] == arr[1] and arr[2] == arr[0] and (arr[1] == arr[2]):
		print('YES')
		print(arr[0], arr[1], arr[2])
	else:
		print('YES')
		x = arr[0]
		y = arr[1]
		z = arr[2]
		a = x
		b = 1
		c = z
		print(a, b, c)

def main():
	test_cases = int(input())
	for test_units in range(test_cases):
		solve()
execution_time_start = time.clock()
main()
execution_time_stop = time.clock()
print_to_stderr('Total Time Taken: %f Seconds!' % (execution_time_stop - execution_time_start))


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	if l.count(min(l)) == 2 or len(set(l)) == 3:
		print('NO')
	else:
		print('YES')
		print(1, max(l), min(l))


from collections import Counter
for _ in range(int(input())):
	l = sorted(list(map(int, input().split())))
	s = list(set(l))
	d = Counter(l)
	if len(d) == 3:
		print('NO')
	elif len(d) == 1:
		print('YES')
		print(*l)
	elif d[max(l)] == 2:
		print('YES')
		s.append(1)
		print(*s)
	else:
		print('NO')


n = int(input())
for i in range(n):
	flag = 0
	xyz = list(map(int, input().split()))
	maxcount = 0
	a = max(xyz)
	mi = min(xyz)
	for j in xyz:
		if a == j:
			maxcount += 1
		else:
			continue
	if maxcount == 3:
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	elif maxcount == 2:
		if xyz[0] == xyz[2]:
			if mi == 1:
				print('YES')
				print(mi, mi, a)
			else:
				print('YES')
				print(a, mi, mi - 1)
		else:
			print('YES')
			print(a, mi, mi)
	else:
		print('NO')


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()
for _ in range(INT()):
	arr = ARR()
	ar = sorted(list(set(arr)))
	if len(ar) == 3 or (len(ar) == 2 and arr.count(ar[-1]) == 1):
		print('NO')
		continue
	print('YES')
	print(ar[-1], ar[0], ar[0])


n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	l.sort()
	if len(set(l)) == 3:
		print('NO')
	elif len(set(l)) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	elif l[0] != l[1] and l[2] == l[1]:
		print('YES')
		print(min(l), min(l), max(l))
	else:
		print('NO')


for x in [0] * int(input()):
	s = input().split(' ')
	if s[0] == s[1] and s[1] == s[2]:
		print('YES')
		print(' '.join(s))
	elif s[0] == s[1] and int(s[1]) > int(s[2]) or (s[0] == s[2] and int(s[2]) > int(s[1])) or (s[2] == s[1] and int(s[1]) > int(s[0])):
		print('YES')
		l = [int(char) for char in s]
		ma = max(l)
		mi = min(l)
		print(' '.join([str(mi), str(mi), str(ma)]))
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	m = max(a)
	if a.count(m) < 2:
		print('NO')
	else:
		r = [min(a)] * 2
		r.append(m)
		print('YES')
		print(*r)


t = int(input())
while t:
	l = [int(x) for x in input().split()]
	l.sort()
	if l[0] == l[1] and l[0] >= l[2]:
		print('YES')
		print(l[0], l[2], 1)
	elif l[1] == l[2] and l[1] >= l[0]:
		print('YES')
		print(l[0], l[1], 1)
	else:
		print('NO')
	t -= 1


def solve(n):
	ans = []
	return ans
t = int(input())
for ___ in range(t):
	inp_str = input()
	(x, y, z) = (int(elem) for elem in inp_str.split(' '))
	if x < y:
		(x, y) = (y, x)
	if y < z:
		(y, z) = (z, y)
	if x < y:
		(x, y) = (y, x)
	if y < z:
		(y, z) = (z, y)
	if x > y:
		print('NO')
	else:
		print('YES')
		if y > z:
			print(f'{x} {z} {z}')
		else:
			print(f'{x} {x} {x}')


t = int(input())
for i in range(t):
	(x, y, z) = [int(i) for i in input().split()]
	m = max([x, y, z])
	if x == y and y == z:
		print('YES')
		print(x, x, x, '\n')
	elif x + y + z - m - m == x or x + y + z - m - m == z or x + y + z - m - m == y:
		print('YES')
		print(m, x + y + z - m - m, x + y + z - m - m, '\n')
	else:
		print('NO\n')


t = int(input())
nums = []
for i in range(t):
	nums.append([int(x) for x in input().split()])
output = []
for num in nums:
	num.sort()
	x = num[0]
	y = num[1]
	z = num[2]
	if x < y and x < z and (y < z):
		print('NO')
	elif x < y and x < z and (y == z):
		print('YES')
		print('1 {} {}'.format(x, z))
	elif x == y and x < z and (y < z):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print('{} {} {}'.format(x, y, z))


import random

def findabc(x, y, z):
	if x == y == z:
		print('YES')
		print(x, x, x)
		return
	l = [x, y, z]
	l.sort()
	if l[1] == l[2]:
		(a, b) = (l[1], l[0])
		c = random.randint(1, l[0])
		print('YES')
		print(a, b, c)
		return
	print('NO')
	return
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	findabc(x, y, z)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = []
	l.append(x)
	l.append(y)
	l.append(z)
	ma = max(l)
	count = l.count(ma)
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif count == 2:
		print('YES')
		print(max(l), min(l), min(l))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	m = max(l)
	c = 0
	for i in l:
		if i == m:
			c += 1
	if c >= 2:
		print('YES')
		mn = min(l)
		print(mn, mn, m)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) > 2:
		print('NO')
	elif [x, y, z].count(max(x, y, z)) < 2:
		print('NO')
	else:
		print('YES')
		m = max([x, y, z])
		n = min([x, y, z])
		if x == n:
			print(n, n, m)
		elif y == n:
			print(n, m, n)
		else:
			print(m, n, n)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	seq = list(map(int, input().split()))
	count = dict()
	for num in seq:
		count[num] = count.get(num, 0) + 1
	comp = []
	for (key, val) in count.items():
		comp.append((key, val))
	comp.sort()
	if len(comp) == 1:
		print('YES')
		print(comp[0][0], comp[0][0], comp[0][0])
	elif len(comp) == 3:
		print('NO')
	elif comp[0][1] > comp[1][1]:
		print('NO')
	else:
		print('YES')
		print(comp[1][0], comp[0][0], comp[0][0])


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	(x, y, z) = sorted(li())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif y == z:
		print('YES')
		print(1, x, z)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = max(x, y, z)
	count = 0
	if a == x:
		count += 1
	if a == y:
		count += 1
	if a == z:
		count += 1
	if count < 2:
		print('No')
	else:
		if x < a:
			b = x
		elif y < a:
			b = y
		elif z < a:
			b = z
		else:
			b = z
		print('Yes')
		print(f'{a} {b} {1}')


t = int(input())
while t > 0:
	l = []
	(x, y, z) = map(int, input().split())
	l.append(x)
	l.append(y)
	l.append(z)
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])
	t = t - 1


def solve(arr):
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
	else:
		print('YES')
		print(f'{arr[0]} {arr[0]} {arr[2]}')
t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	solve(arr)


for z in range(int(input())):
	(a, b, r) = sorted(map(int, input().split()))
	if b == r:
		print('YES')
		print(a, a, r)
	else:
		print('NO')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	if max(arr[0], arr[1]) == max(arr[1], arr[2]) and max(arr[2], arr[1]) == max(arr[0], arr[2]):
		print('YES')
		arr.sort()
		print(arr[0], arr[1], arr[0])
	else:
		print('NO')


def call():
	l = [int(x) for x in input().split()]
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])
for _ in range(int(input())):
	call()


testcases = int(input())
for i in range(testcases):
	ls = input().split(' ')
	ls = [int(i) for i in ls]
	x = ls[0]
	y = ls[1]
	z = ls[2]
	if max(ls) == x and max(ls) == y or (max(ls) == x and max(ls) == z) or (max(ls) == y and max(ls) == z):
		print('YES')
		if len([i for i in ls if i != max(ls)]) == 0:
			print(f'{max(ls)} {max(ls)} {max(ls)}')
		else:
			print(f'{max(ls)} {min(ls)} {min(ls)}')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split(' '))
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and y != z and (x != z):
		print('NO')
	elif x > y and x == z or (y > x and y == z) or (z > y and x == z) or (y > z and x == y):
		print('YES')
		x = list(set([x, y, z]))
		x = sorted(x, reverse=True)
		print(x[0], x[1], x[1])
	else:
		print('NO')


t = int(input())
for i in range(1, t + 1):
	(x, y, z) = map(int, input().split())
	mmax = max(x, y)
	mmax = max(mmax, z)
	if x == y and x == z:
		print('YES')
		print(x, y, z)
	elif x == mmax and (x == y or x == z):
		print('YES')
		print(x, min(y, z), min(y, z))
	elif y == mmax and (x == y or y == z):
		print('YES')
		print(y, min(x, z), min(x, z))
	elif z == mmax and (x == z or y == z):
		print('YES')
		print(z, min(x, y), min(x, y))
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	k = l.copy()
	k.sort()
	if len(set(l)) < 3:
		if len(set(l)) == 1:
			print('YES')
			print(*l)
		elif k[1] > k[0]:
			if l[0] > l[1]:
				print('YES')
				print(max(l), min(l), 1)
			else:
				print('YES')
				print(min(l), min(l), max(l))
		else:
			print('NO')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	dic = {}
	for i in range(3):
		if l[i] in dic:
			dic[l[i]] += 1
		else:
			dic[l[i]] = 1
	if len(dic) == 3:
		print('NO')
		continue
	if len(dic) == 1:
		print('YES')
		print(*l)
		continue
	if len(dic) == 2:
		dic = sorted(dic.items())
		if dic[0][1] < dic[1][1]:
			print('YES')
			print(1, dic[0][0], dic[1][0])
		else:
			print('NO')
		continue


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
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
mod = int(pow(10, 9) + 7)
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return 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)]
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('out.txt', 'w')
except:
	pass
t = L()[0]
for _ in range(t):
	(x, y, z) = L()
	if max(x, y) != max(x, z) or max(x, y) != max(y, z):
		print('NO')
		continue
	print('YES')
	if x == z:
		print(y, x, y)
	elif y == z:
		print(x, x, y)
	elif x == y:
		print(z, z, x)


t = int(input(''))
mat = []
for i in range(t):
	mat.append(list(map(int, input().split())))
for i in range(t):
	matt = mat[i]
	matt = sorted(matt, reverse=True)
	x = matt[0]
	y = matt[1]
	z = matt[2]
	if x == y and x == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		print('YES')
		print(x, z, z)
	else:
		print('NO')


for t in range(int(input())):
	(x, y, z) = sorted(map(int, input().split()))
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	if x != y and y != z and (x != z):
		print('NO')
	if x == y and y != z:
		print('NO')
	if x != y and y == z:
		print('YES')
		print(1, x, z)


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if len({a, b, c}) == 3:
		print('NO')
	elif len({a, b, c}) == 2:
		if [a, b, c].count(max([a, b, c])) == 1:
			print('NO')
		else:
			minimum = min([a, b, c])
			maximum = max([a, b, c])
			print('YES')
			print('{} {} {}'.format(minimum, minimum, maximum))
	else:
		print('YES')
		print('{} {} {}'.format(a, b, c))


for _ in range(int(input())):
	c = sorted(list(map(int, input().split())))
	if c.count(max(c)) >= 2:
		print('YES')
		print(1, c[0], c[1])
	else:
		print('NO')


while True:
	try:
		t = eval(input())
		for i in range(t):
			(x, y, z) = list(map(int, input().split()))
			if x > y and x == z:
				print('YES')
				print(x, y, y)
			elif y > x and y == z:
				print('YES')
				print(y, x, x)
			elif x == y and y > z:
				print('YES')
				print(x, z, z)
			elif x == y and x == z:
				print('YES')
				print(x, x, x)
			else:
				print('NO')
	except:
		break


for t in range(int(input())):
	xyz = [int(e) for e in input().split()]
	mn = max(xyz)
	if xyz.count(mn) > 1:
		xyz.remove(mn)
		print('YES')
		xyz.remove(mn)
		print(mn, xyz[0], xyz[0])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	array = [int(s) for s in input().split(' ')]
	if len(set(array)) == 3 or array.count(max(array)) == 1:
		print('NO')
		continue
	print('YES')
	print(f'{max(array)} {min(array)} {min(array)}')


t = int(input())
for i in range(t):
	inp = [int(j) for j in input().split()]
	inp.sort()
	(a, b, c) = (inp[2], inp[1], inp[0])
	if a == b == c:
		print('YES')
		print(a, a, a)
		continue
	if a == b:
		print('YES')
		print(a, c, c)
		continue
	print('NO')


T = int(input())
for t in range(T):
	num = list(map(int, input().split()))
	num.sort()
	if num.count(max(num)) >= 2:
		print('YES')
		print(num[0], num[0], num[2])
	else:
		print('NO')


T = int(input())
for t in range(T):
	(a, b, c) = sorted([int(i) for i in input().split()])
	if a == b and b == c:
		print('YES')
		print(a, b, c)
	elif b == c:
		print('YES')
		print(a, a, b)
	else:
		print('NO')


t = int(input())
while t:
	l = list(map(int, input().split()))
	l1 = list()
	x = l[0]
	y = l[1]
	z = l[2]
	f = len(list(set(l)))
	e = list(set(l))
	if f == 3:
		print('NO')
	elif f == 1:
		print('YES')
		print(x, y, z)
	elif f == 2:
		a = max(e)
		b = min(e)
		c = min(e) - 1
		if c == 0:
			c = 1
		elif a == 0:
			a = 1
		elif b == 0:
			b = 1
		l1.append(max(a, b))
		l1.append(max(a, c))
		l1.append(max(b, c))
		l.sort()
		l1.sort()
		if l == l1:
			print('YES')
			print(a, b, c)
		else:
			print('NO')
	t -= 1


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if len(set((x, y, z))) == 3:
		print('NO')
	elif len(set((x, y, z))) == 2:
		l = [x, y, z]
		l.sort()
		if l[0] == l[1]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[1], l[0])
	else:
		print('YES')
		print(x, x, x)


t = int(input())
for p in range(t):
	(x, y, z) = map(int, input().split())
	maxx = max(x, max(y, z))
	minn = min(x, min(y, z))
	count = 0
	if maxx == x:
		count += 1
	if maxx == y:
		count += 1
	if maxx == z:
		count += 1
	if count > 1:
		print('YES')
		print(str(maxx) + ' ' + str(minn) + ' ' + str(minn))
	else:
		print('NO')


a = int(input())
for i in range(a):
	(b, c, d) = sorted(map(int, input().split()))
	if b == c == d:
		print('YES')
		print(b, c, d)
	if c == d and c > b and (b == 1):
		print('YES')
		print(d, b, b)
	if c == d and c > b and (b > 1):
		print('YES')
		print(d, b, b - 1)
	if c != d:
		print('NO')


t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	arr.sort()
	two = set(arr)
	if len(two) <= 2 and arr[1] == arr[2]:
		print('YES')
		print(f'{min(arr)} {min(arr)} {max(arr)}')
	else:
		print('NO')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	mx = max([a, b, c])
	cnt = 0
	if mx == a:
		cnt += 1
	if mx == b:
		cnt += 1
	if mx == c:
		cnt += 1
	if cnt == 3:
		print('YES')
		print(*[mx, mx, mx])
	elif cnt == 2:
		print('YES')
		z = sorted(list(set([a, b, c])))[0]
		print(*[mx, z, z])
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	d = [a, b, c]
	d.sort(reverse=True)
	if d[0] == d[1]:
		print('YES')
		if d[1] == d[2]:
			print(d[0], d[1], d[2])
		else:
			print(d[0], d[2], d[2])
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def solve():
	mx = max(xyz)
	cnt = xyz.count(mx)
	if cnt < 2:
		print('NO')
		return
	if cnt == 3:
		ans = [mx] * 3
	elif xyz[0] != mx:
		ans = [xyz[0], xyz[0], mx]
	elif xyz[1] != mx:
		ans = [xyz[1], mx, xyz[1]]
	else:
		ans = [mx, xyz[2], xyz[2]]
	print('YES')
	print(*ans)
for _ in range(II()):
	xyz = LI()
	solve()


from sys import stdin
(x, y, z) = (0, 0, 0)
(us, us1, us2, us3) = (True, True, True, True)
t = int(stdin.readline())
for _ in range(t):
	(x, y, z) = map(int, stdin.readline().split())
	us = x == y and y == z
	if us:
		print('YES')
		print(f'{x} {x} {x}')
	else:
		us1 = x < y and y == z
		us2 = y < x and x == z
		us3 = z < x and x == y
		if us1 or us2 or us3:
			print('YES')
			if x < y:
				print(f'{x} {x} {y}')
			elif y < x:
				print(f'{y} {x} {y}')
			else:
				print(f'{x} {z} {z}')
		else:
			print('NO')


t = int(input())
for it in range(t):
	(a, b, c) = list(map(int, input().split()))
	mx = max(a, b, c)
	sr = min(max(a, b), max(b, c), max(a, c))
	mn = min(a, b, c)
	if a != b and a != c and (b != c):
		print('NO')
	elif a == b == c:
		print('YES')
		print(a, b, c)
	elif sr == mn and sr != mx:
		print('NO')
	elif sr == mx and sr != mn:
		print('YES')
		print(mx, mn, mn)
	else:
		print('NO')


def solution(x, y, z):
	flag = 'NO'
	res = dict()
	if x == y or y == z or x == z:
		if x == y:
			flag = 'YES'
			res['a'] = x
			res['c'] = z
			if z > x:
				print('NO')
				return
		if y == z:
			flag = 'YES'
			res['c'] = y
			res['b'] = x
			if x > y:
				print('NO')
				return
		if x == z:
			flag = 'YES'
			res['b'] = z
			res['a'] = y
			if y > x:
				print('NO')
				return
		if len(res.values()) < 3:
			if res.get('a', None) is None:
				res['a'] = 1
			if res.get('b', None) is None:
				res['b'] = 1
			if res.get('c', None) is None:
				res['c'] = 1
	print(flag)
	if flag == 'YES':
		print('%d %d %d' % (res['a'], res['b'], res['c']))
num_inputs = int(input())
args = []
for i in range(num_inputs):
	(x, y, z) = [int(i) for i in input().split(' ')]
	args.append([x, y, z])
for arg in args:
	solution(arg[0], arg[1], arg[2])


from sys import stdin, stdout
t = int(stdin.readline())
for _ in range(t):
	array = sorted(map(int, stdin.readline().split()))
	if array[1] != array[2]:
		stdout.write('NO\n')
	else:
		stdout.write('YES\n')
		stdout.write(str(array[0]) + ' ' + str(array[0]) + ' ' + str(array[2]) + '\n')


for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	s1 = set()
	s1.add(x)
	s1.add(y)
	s1.add(z)
	if len(s1) == 1:
		print('YES')
		print(x, y, z)
	elif len(s1) == 3:
		print('NO')
	elif len(s1) == 2:
		if x == y and x > z:
			print('YES')
			print(x, z, z)
		elif y == z and y > x:
			print('YES')
			print(y, x, x)
		elif x == z and x > y:
			print('YES')
			print(z, y, y)
		else:
			print('NO')


for i in range(int(input())):
	j = [int(i) for i in input().split()]
	x = j[0]
	y = j[1]
	z = j[2]
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y and x < z or (z == y and z < x) or (x == z and x < y):
		print('NO')
	elif x != y != z and x != z != y:
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), 1)


n = int(input())
for j in range(n):
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]
	z = l[2]
	if x != y and x != z and (y != z):
		print('NO')
	elif x == y and x < z or (x == z and x < y) or (y == z and z < x):
		print('NO')
	elif x != y:
		print('YES')
		print(1, x, y)
	elif x != z:
		print('YES')
		print(1, x, z)
	elif x == y == z:
		print('YES')
		print(x, y, z)


x = int(input())
for i in range(0, x):
	numeros = list(map(int, input().split()))
	maximo = max(numeros)
	minimo = min(numeros)
	if numeros.count(maximo) < 2:
		print('NO')
	else:
		print('YES')
		print(maximo, minimo, 1)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	L = [x, y, z]
	if len(set(L)) == 3:
		print('NO')
		continue
	L.sort()
	if L[1] == L[2]:
		if y == min(x, y, z):
			print('YES')
			print(L[0], L[1], L[0])
		else:
			print('YES')
			print(L[2], L[0], L[0])
		continue
	if L[0] == L[1]:
		print('NO')


a = int(input())
for i in range(a):
	l = [int(i) for i in input().split()]
	x = sorted(l)
	if x[1] != x[2]:
		print('NO')
	else:
		print('YES')
		print(x[0], end=' ')
		print(x[0], end=' ')
		print(x[1])


for _ in range(int(input())):
	X = list(map(int, input().split()))
	if X[0] == X[1] and X[0] >= X[-1]:
		print('YES')
		print(max(X), min(X), min(X))
	elif X[0] == X[-1] >= X[1]:
		print('YES')
		print(min(X), max(X), min(X))
	elif X[1] == X[-1] >= X[0]:
		print('YES')
		print(min(X), min(X), max(X))
	else:
		print('NO')


for t in range(int(input())):
	(s, a, m) = sorted(map(int, input().split()))
	if a == m:
		print('YES')
		print(s, s, m)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x >= z:
		print('Yes')
		print(x, z, z)
	elif x == z and z >= y:
		print('Yes')
		print(y, x, y)
	elif y == z and y >= x:
		print('Yes')
		print(x, x, z)
	else:
		print('No')


t = int(input())
for _ in range(0, t):
	a = list(map(int, input().split()))
	p = a.count(a[0])
	q = a.count(a[1])
	r = a.count(a[2])
	if p == 1 and q == 1 and (r == 1):
		print('NO')
	else:
		if p >= 2:
			d = a.count(a[0])
		elif q >= 2:
			d = a.count(a[1])
		else:
			d = a.count(a[2])
		z = max(a)
		x = a.count(z)
		if d == x:
			if x == 2:
				print('YES')
				print(min(a), min(a), z)
			if x > 2:
				print('YES')
				print(max(a), max(a), max(a))
		else:
			print('NO')


t = int(input())
for case in range(t):
	(a, b, c) = input().split(' ')
	(a, b, c) = (int(a), int(b), int(c))
	if a == b:
		if a < c:
			print('NO')
		else:
			print('YES')
			print(a, c, c)
	else:
		ma = max(a, b)
		if c == ma:
			print('YES')
			print(c, 1, min(a, b))
		else:
			print('NO')


t = int(input())

def sol():
	inp = input()
	arr = inp.split(' ')
	x = int(arr[0])
	y = int(arr[1])
	z = int(arr[2])
	a = 1
	b = 1
	c = 1
	boo = False
	if x == y and x >= z:
		boo = True
		a = x
		b = z
	elif x == z and x >= y:
		boo = True
		a = y
		b = x
	elif z == y and z >= x:
		boo = True
		c = y
		b = x
	if boo is True:
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))
	else:
		print('NO')
for j in range(t):
	sol()


for i in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	if y == z and x < y:
		print('YES')
		print('%d %d %d' % (x, x, y))
	elif x == y and z < x:
		print('YES')
		print('%d %d %d' % (z, z, x))
	elif x == z and y < x:
		print('YES')
		print('%d %d %d' % (y, x, y))
	elif x == y == z:
		print('YES')
		print('%d %d %d' % (x, y, y))
	else:
		print('NO')


import random
t = int(input())
for i in range(t):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	h = 0
	m = max(x, max(y, z))
	if m == x:
		h = h + 1
	if m == y:
		h = h + 1
	if m == z:
		h = h + 1
	if h > 1:
		a = max(x, max(y, z))
		b = min(x, min(y, z))
		c = b
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		(a, b, c) = (0, 0, 0)
		(x, y, z) = list(map(int, input().split()))
		if x == y:
			a = x
			b = z
			if z > x:
				print('NO')
				continue
			else:
				print('YES')
				print(a, b, 1)
				continue
		if x == z:
			b = x
			a = y
			if y > x:
				print('NO')
				continue
			else:
				print('YES')
				print(a, b, 1)
				continue
		if y == z:
			c = y
			a = x
			if x > y:
				print('NO')
				continue
			else:
				print('YES')
				print(a, 1, c)
				continue
		else:
			print('NO')
main()


T = int(input())
for i in range(T):
	ip = input()
	a = b = c = 0
	ar = ip.split()
	for p in range(3):
		ar[p] = int(ar[p])
	if ar[0] == ar[1] and ar[0] < ar[2] or (ar[0] == ar[2] and ar[0] < ar[1]) or (ar[2] == ar[1] and ar[1] < ar[0]):
		print('NO')
	elif ar[0] != ar[1] and ar[0] != ar[2] and (ar[2] != ar[1]):
		print('NO')
	else:
		print('YES')
		if ar[0] == ar[1] == ar[2]:
			a = b = c = ar[0]
		else:
			ar.sort()
			a = ar[-1]
			b = ar[0]
			c = 1
		print(a, b, c)


def f():
	l = [int(i) for i in input().split()]
	for i in range(3):
		for j in range(3):
			for k in range(3):
				(a, b, c) = (l[i], l[j], l[k])
				if l[0] == max(a, b) and l[1] == max(a, c) and (l[2] == max(b, c)):
					print('YES')
					print(a, b, c)
					return
	else:
		print('NO')
		return
t = int(input())
while t:
	f()
	t -= 1


q = int(input())
for i in range(q):
	l = list(map(int, input().split(' ')))
	l.sort()
	l = l[::-1]
	(x, y, z) = l
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y and z < x:
		print('YES')
		print(x, z, z)
	else:
		print('NO')


n = int(input())
while n > 0:
	g = input()
	(a, b, c) = g.split()
	x = int(a)
	y = int(b)
	z = int(c)
	k = [x, y, z]
	k.sort()
	if k[2] != k[1]:
		print('NO')
	else:
		print('YES')
		print(k[0], k[1], k[0])
	n = n - 1


n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	z = max(l)
	if l[0] == l[1] and l[1] == l[2]:
		print('YES')
		print(*l)
	elif l[0] == l[1] and z == l[0]:
		print('YES')
		if l[2] != 1:
			print(l[0], l[2], l[2] - 1)
		else:
			print(1, 1, l[0])
	elif l[0] == l[2] and z == l[0]:
		print('YES')
		if l[1] != 1:
			print(l[0], l[1], l[1] - 1)
		else:
			print(1, 1, l[0])
	elif l[1] == l[2] and z == l[1]:
		print('YES')
		if l[0] != 1:
			print(l[1], l[0], l[0] - 1)
		else:
			print(1, 1, l[1])
	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):
	(x, y, z) = map(int, input().split())
	sol = solve(x, y, z)
	if sol:
		print('YES')
		print(' '.join(map(str, sol)))
	else:
		print('NO')


n = int(input())
for i in range(n):
	temp = list(map(int, input().split()))
	a = temp.index(max(temp))
	if temp[a] != temp[(a + 1) % 3] and temp[a] != temp[(a + 2) % 3]:
		print('NO')
	elif temp[a] == temp[(a + 1) % 3] and temp[a] == temp[(a + 2) % 3]:
		print('YES')
		print(temp[0], temp[1], temp[2])
	elif temp[a] == temp[(a + 1) % 3]:
		print('YES')
		print(temp[a], 1, temp[(a + 2) % 3])
	else:
		print('YES')
		print(temp[a], 1, temp[(a + 1) % 3])


def check(a, b, c, x, y, z):
	if x != max(a, b) or y != max(a, c) or z != max(b, c):
		return False
	else:
		return True

def big_check(x, y, z):
	arr = [x, y]
	brr = [x, z]
	crr = [y, z]
	for a in arr:
		for b in brr:
			for c in crr:
				bol = check(a, b, c, x, y, z)
				if bol:
					return (a, b, c)
	return None
n = int(input())
for i in range(n):
	inp = input()
	arr = list(map(int, inp.split()))
	res = big_check(arr[0], arr[1], arr[2])
	if res is None:
		print('NO')
	else:
		print('YES')
		print(f'{res[0]} {res[1]} {res[2]}')


n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	a = sorted(a)
	if a[2] != a[1]:
		print('NO')
	else:
		print('Yes\n', a[0], a[0], a[2])


n = int(input())
l2 = []
for i in range(n):
	l2.append([int(x) for x in input().split()])
for i in range(n):
	l2[i].sort()
	if l2[i][1] != l2[i][2]:
		print('NO')
	elif l2[i][0] == l2[i][1]:
		print('YES')
		print(l2[i][0], l2[i][1], l2[i][2])
	else:
		print('YES')
		print(l2[i][0], l2[i][0], l2[i][2])
print()


for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	if a.count(max(a)) < 2:
		print('NO')
	else:
		print('YES')
		if a[0] == max(a) and a[1] == max(a):
			A = max(a)
			B = min(a)
			C = min(a)
		elif a[0] == max(a) and a[2] == max(a):
			B = max(a)
			A = min(a)
			C = min(a)
		else:
			C = max(a)
			A = min(a)
			B = min(a)
		print(A, B, C)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().strip().split(' '))
	f = 0
	if x == y or y == z or z == x:
		if x == y and z <= x:
			print('YES')
			print(x, z, z, end=' ')
			print()
			f = 1
		elif x == z and y <= x:
			print('YES')
			print(x, y, y, end=' ')
			print()
			f = 1
		elif y == z and x <= y:
			print('YES')
			print(y, x, x, end=' ')
			print()
			f = 1
	if f == 0:
		print('NO')


t = int(input())
for tt in range(t):
	(ab, ac, bc) = map(int, input().split())
	if ab == ac and ab == bc:
		print('YES')
		print(ab, ac, bc)
	elif ab != ac and ab != bc and (bc != ac):
		print('NO')
	elif ab == ac and bc < ac:
		print('YES')
		x = ab
		y = bc
		z = y - 1
		if z > 0:
			print(x, y, z)
		else:
			print(x, y, y)
	elif bc == ac and bc > ab:
		print('YES')
		z = bc
		y = ab
		x = y - 1
		if x > 0:
			print(x, y, z)
		else:
			print(y, y, z)
	elif ab == bc and bc > ac:
		print('YES')
		y = ab
		x = ac
		z = ac - 1
		if z > 0:
			print(x, y, z)
		else:
			print(x, y, x)
	else:
		print('NO')


from collections import defaultdict
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == b and b == c and (c == a):
		print('YES')
		print(a, a, a)
		continue
	elif a != b and b != c and (c != a):
		print('NO')
		continue
	d = defaultdict(int)
	for i in [a, b, c]:
		d[i] += 1
	x = 1000000000
	y = 0
	for i in d:
		if i > y:
			y = i
		if x > i:
			x = i
	if d[y] > d[x]:
		print('YES')
		print(y, x, x)
	else:
		print('NO')


count = int(input())
for i in range(count):
	arr = list(map(lambda x: int(x), input().split(' ')))
	arr = sorted(arr)
	if arr[0] == arr[1] and arr[1] == arr[2]:
		print('YES')
		print(*arr)
	if arr[0] < arr[1] and arr[1] == arr[2]:
		res = [arr[0], arr[1], 1]
		print('YES')
		print(*res)
	if arr[0] == arr[1] and arr[1] < arr[2]:
		print('NO')
	if arr[0] < arr[1] and arr[1] < arr[2]:
		print('NO')


t = int(input())
i = 1
while i <= t:
	lst = list(map(int, input().strip().split()))[:3]
	m = max(lst)
	l = len(set(lst))
	if l == 3:
		print('NO')
	elif l == 2 and lst.count(m) != 2:
		print('NO')
	else:
		print('YES')
		if l == 1:
			print(lst[0], lst[1], lst[2])
		else:
			print(min(lst), min(lst), m)
	i += 1


t = int(input())
for tt in range(t):
	l = sorted(list(map(int, input().split())), reverse=True)
	if l[0] == l[1]:
		print('YES')
		print(l[0], l[2], 1)
	else:
		print('NO')


t = int(input())
for test in range(t):
	ar = list(map(int, input().rstrip().split()))
	ar.sort()
	if ar[0] == ar[1] == ar[2]:
		print('YES')
		print(ar[0], ar[1], ar[2])
	elif ar[0] == ar[1]:
		print('NO')
	elif ar[1] == ar[2]:
		print('YES')
		print(ar[0], ar[1], 1)
	else:
		print('NO')


for _ in range(int(input())):
	arr = [int(i) for i in input().split()]
	arr.sort()
	(x, y, z) = arr
	if x < 0:
		print('NO')
	elif x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y != z:
		print('NO')
	elif x != y == z:
		print('YES')
		print(1, x, z)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	nums = list(map(int, input().split(' ')))
	maximum = max(nums)
	minimum = min(nums)
	if nums.count(maximum) < 2:
		print('NO')
	else:
		print('YES')
		print(maximum, minimum, 1)


for i in range(int(input())):
	A = [int(_) for _ in input().split()]
	if A[0] == A[1] == A[2]:
		print('YES')
		print(*A)
	elif A[0] == A[1] and A[1] > A[2] or (A[1] == A[2] and A[1] > A[0]) or (A[0] == A[2] and A[0] > A[1]):
		print('YES')
		p = set(A)
		for j in p:
			print(j, end=' ')
		print(1)
		print()
	else:
		print('NO')


a = int(input())
while a > 0:
	b = list(map(int, input().split()))
	b.sort(reverse=True)
	if b[0] == b[1]:
		print('YES')
		print(b[0], b[2], b[2], sep=' ')
	else:
		print('NO')
	a = a - 1


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : list(map(int, stdin.readline().strip().split()))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(' '.join(list(map(str, a))))

def solve():
	(x, y, z) = M()
	if max(y, z) < x or max(x, y) < z or max(x, z) < y:
		print('NO')
	else:
		print('YES')
		print(min(x, y), min(y, z), min(x, z))
for _ in range(I()):
	solve()


t = int(input())
while t:
	(x, y, z) = [int(a) for a in input().split()]
	Max = max(x, y, z)
	if x == y and Max == x:
		print('YES')
		print(x, z, z)
	elif x == z and Max == x:
		print('YES')
		print(y, x, y)
	elif y == z and Max == y:
		print('YES')
		print(x, x, y)
	else:
		print('NO')
	t -= 1


t = int(input())
for _ in range(t):
	(x, y, z) = list(map(int, input().split()))
	if x != y and y != z and (x != z):
		print('NO', end='\n')
	elif x == z and x < y or (x == y and x < z) or (y == z and y < x):
		print('NO', end='\n')
	elif x == y and y == z:
		print('YES', end='\n')
		print(x, ' ', y, ' ', z, end='\n')
	else:
		print('YES', end='\n')
		print(max(x, y, z), ' ', min(x, y, z), ' ', min(x, y, z))


t = int(input())
for item in range(t):
	arr = [int(i) for i in input().split()]
	arr.sort(reverse=True)
	if arr[0] == arr[1] and arr[1] == arr[2]:
		print('YES')
		print(str(arr[0]) + ' ' + str(arr[0]) + ' ' + str(arr[0]))
	elif arr[0] != arr[1] and arr[1] != arr[2] or arr[1] == arr[2]:
		print('NO')
	else:
		print('YES')
		print(str(arr[0]) + ' ' + str(arr[2]) + ' ' + str(arr[2]))


for i in range(int(input())):
	array = sorted([int(x) for x in input().split()])
	if array[1] == array[2] == array[0]:
		print('YES')
		print(*array)
	elif array[1] == array[2]:
		print('YES')
		print(array[2], array[0], array[0])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	s = set(a)
	if len(s) == 1:
		print('YES')
		print(a[0], a[0], a[0])
	elif len(s) == 2:
		if a.count(max(a)) == 2:
			print('YES')
			print(max(a), min(a), min(a))
		else:
			print('NO')
	else:
		print('NO')


import random

def counter(x, y, z):
	l = [x, y, z]
	k = sorted(l, reverse=True)
	(x, y, z) = (k[0], k[1], k[2])
	a = x
	b = min(y, z)
	c = random.choice(range(1, z + 1))
	if x != y:
		return 'NO'
	else:
		return 'YES\n{} {} {}'.format(a, b, c)
inputs = int(input())
myList = []
for i in range(inputs):
	(x, y, z) = map(int, input().split())
	myList.append(counter(x, y, z))
for val in myList:
	print(val)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	m = list(map(int, input().split()))
	m.sort(reverse=True)
	if m[0] == m[1] and m[1] == m[2]:
		print('YES')
		print(m[0], m[1], m[2])
	elif m[0] == m[1]:
		print('YES')
		print(m[0], m[2], m[2])
	else:
		print('NO')


def main(x, y, z):
	if x != y:
		if y != z:
			if x != z:
				print('NO')
	if x == y:
		if x > z:
			a = z
			b = z
			c = x
			print('YES')
			print(a, b, c)
		elif x < z:
			print('NO')
	if z == y:
		if x < z:
			a = x
			b = x
			c = z
			print('YES')
			print(a, b, c)
		elif x > z:
			print('NO')
	if x == z:
		if y < z:
			a = y
			b = y
			c = z
			print('YES')
			print(a, b, c)
		elif y > z:
			print('NO')
	if x == y:
		if y == z:
			print('YES')
			print(x, y, z)
t = int(input())
for t_itr in range(t):
	xyz = list(map(int, input().rstrip().split()))
	x = xyz[0]
	y = xyz[1]
	z = xyz[2]
	res = main(x, y, z)


t = int(input())
for test in range(t):
	nums = [int(v) for v in input().split()]
	maxi = max(nums)
	mini = min(nums)
	count = nums.count(maxi)
	if count > 1:
		print('YES')
		if mini == nums[0]:
			ans = [mini, mini, maxi]
		elif mini == nums[1]:
			ans = [mini, maxi, mini]
		else:
			ans = [maxi, mini, mini]
		print(ans[0], ans[1], ans[2])
	else:
		print('NO')


import bisect
import collections
import copy
import fractions
import functools
import heapq
import math
import random
import sys

def _p(str):
	sys.stdout.write(str + '\n')

def _i():
	return sys.stdin.readline()
T = int(_i())
for t in range(T):
	(X, Y, Z) = tuple(map(int, _i().split()))
	if X != Y and Y != Z and (X != Z):
		_p('NO')
	else:
		if X == Y:
			(same, diff) = (X, Z)
		elif Y == Z:
			(same, diff) = (Y, X)
		else:
			(same, diff) = (X, Y)
		if same < diff:
			_p('NO')
		else:
			_p('YES')
			_p(' '.join(map(str, [same, diff, diff])))
sys.stdout.flush()


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')


class A:

	def __init__(self):
		(self.x, self.y, self.z) = [int(x) for x in input().split()]

	def solve_and_print(self):
		(x, y, z) = (self.x, self.y, self.z)
		if x == y and z <= x:
			print('YES')
			print(f'{x} {z} {z}')
		elif y == z and x <= y:
			print('YES')
			print(f'{x} {x} {y}')
		elif x == z and y <= z:
			print('YES')
			print(f'{y} {x} {y}')
		else:
			print('NO')
for _ in range(int(input())):
	A().solve_and_print()


t = int(input())
for _ in range(t):
	nums = list(map(int, input().strip().split()))
	if nums[0] == nums[1] == nums[2]:
		print('YES')
		print(f'{nums[0]} {nums[0]} {nums[0]}')
	else:
		nums.sort()
		if nums[0] < nums[1] and nums[1] == nums[2]:
			print('YES')
			print(f'{nums[0]} {nums[1]} {min(nums[1], 1)}')
		else:
			print('NO')


from collections import Counter
for _ in range(int(input())):
	l = [i for (i, j) in sorted(Counter(map(int, input().split())).items(), key=lambda x: x[1])]
	if len(l) == 2:
		if l[0] < l[1]:
			print('YES')
			print(l[0], l[1], 1)
		else:
			print('NO')
	elif len(l) == 1:
		print('YES')
		i = l[0]
		print(i, i, i)
	else:
		print('NO')


for tc in range(int(input())):
	lst = sorted(list(map(int, input().split())))
	if lst[0] == lst[1]:
		if lst[2] == lst[1]:
			print('YES')
			print(lst[0], lst[0], lst[0])
		else:
			print('NO')
	elif lst[1] != lst[2]:
		print('NO')
	else:
		print('YES')
		print(lst[0], lst[0], lst[1])


t = int(input())
for i in range(t):
	x = [int(v) for v in input().split()]
	x.sort()
	if x[-1] == x[-2]:
		print('YES')
		print(x[0], x[0], x[-1])
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = [int(x) for x in input().split()]
	maxCount = 1
	max = a[0]
	min = a[0]
	for i in range(1, 3):
		if a[i] == max:
			maxCount += 1
		elif a[i] > max:
			max = a[i]
			maxCount = 1
		elif a[i] < min:
			min = a[i]
	if maxCount < 2:
		print('NO')
	else:
		print('YES')
		print(min, min, max)


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	x = list(map(int, inputi().split()))
	x.sort(reverse=True)
	if x[0] != x[1]:
		print('NO')
	else:
		print('YES')
		print(x[0], x[2], x[2])

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


for i in range(int(input())):
	l = list(map(int, input().split()))
	l = sorted(l)
	x = l[0]
	y = l[1]
	z = l[2]
	if x != y != z != x:
		print('NO')
	elif x == y == z == x:
		print('YES')
		print(x, y, z)
	elif x != y and y == z:
		if x - 1 > 0:
			print('YES')
			print(x, y, x - 1)
		else:
			print('YES')
			print(x, y, x)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	mx = max(x, y, z)
	mn = min(x, y, z)
	c = 0
	if mx == x:
		c += 1
	if mx == y:
		c += 1
	if mx == z:
		c += 1
	if c >= 2:
		print('YES')
		print(mx, mn, mn)
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	A = max(x, y, z)
	B = min(x, y, z)
	if x == y == z:
		print('YES')
		print(A, A, A)
	elif x == y:
		if max(x, y, z) == x:
			print('YES')
			print(B, B, A)
		else:
			print('NO')
	elif y == z:
		if max(x, y, z) == y:
			print('YES')
			print(B, B, A)
		else:
			print('NO')
	elif x == z:
		if max(x, y, z) == x:
			print('YES')
			print(B, B, A)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	str = input()
	arr = str.split()
	x = int(arr[0])
	y = int(arr[1])
	z = int(arr[2])
	if x != y and x != z and (y != z):
		print('NO')
	elif x == y and y == z:
		print('YES')
		print(x, x, x)
	else:
		min_1 = min(x, y, z)
		count = 0
		if min_1 == x:
			count += 1
		if min_1 == y:
			count += 1
		if min_1 == z:
			count += 1
		if count == 2:
			print('NO')
		else:
			print('YES')
			print(min_1, min_1, max(x, y, z))


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	(mx, mn) = (max(lst), min(lst))
	cnt = 0
	for v in lst:
		cnt += v == mx
	if cnt < 2:
		print('NO')
		continue
	print('YES')
	print(mx, mn, mn)


for _ in range(int(input())):
	L = sorted(list(map(int, input().split())))
	n = len(set(L))
	if n == 1:
		print('YES')
		print(*L)
	elif n == 3:
		print('NO')
	elif L[2] == L[1]:
		print('YES')
		print(L[2], L[0], 1)
	else:
		print('NO')


t = int(input())
ans = []
a = b = c = 0
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		a = x
		b = x
		c = x
	elif x == y and x > z:
		a = x
		b = z
		c = z
	elif x == z and x > y:
		b = x
		a = y
		c = y
	elif y == z and y > x:
		c = y
		a = x
		b = x
	if a:
		ans.append('YES')
		ans.append([a, b, c])
	else:
		ans.append('NO')
	a = b = c = 0
for i in ans:
	if type(i) == str:
		print(i)
	else:
		print(*i)


T = int(input())

def func(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
for _ in range(T):
	(x, y, z) = map(int, input().split())
	res = func(x, y, z)
	if res:
		print('YES')
		print(' '.join(map(str, res)))
	else:
		print('NO')


def main():
	mmax = max
	iint = int
	mmap = map
	t = int(input())
	for i in range(t):
		(x, y, z) = mmap(iint, input().split())
		(a, b, c) = [max(x, y, z)] * 3
		if mmax(a, b) > x:
			a = x
			b = x - 1 if x - 1 != 0 else x
		if mmax(a, c) > y:
			a = y
			c = y - 1 if y - 1 != 0 else y
		if mmax(b, c) > z:
			b = z
			c = z - 1 if z - 1 != 0 else z
		if mmax(a, b) == x and mmax(a, c) == y and (mmax(b, c) == z):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
main()


from collections import Counter
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	maxx = max(x, y, z)
	cnt = 0
	if x < maxx:
		cnt += 1
	if y < maxx:
		cnt += 1
	if z < maxx:
		cnt += 1
	if cnt > 1:
		print('NO')
	else:
		print('YES')
		minn = min(x, y, z)
		print(minn, minn, maxx)


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	print('YES\n{} {} {}'.format(min(x, y, z), min(x, y, z), max(x, y, z))) if x == y == z or (x == y and x > z) or (x == z and x > y) or (z == y and y > x) else print('NO')


i = int(input())
for q in range(i):
	li = list(map(int, input().split(' ')))
	if li.count(max(li)) >= 2:
		if li.count(max(li)) == 3:
			print('YES')
			print(max(li), max(li), max(li))
		else:
			print('YES')
			print(min(li), min(li), max(li))
	else:
		print('NO')


t = int(input())
for tt in range(t):
	(x, y, z) = sorted([int(x) for x in input().split(' ')])
	if y != z:
		print('NO')
	else:
		print('YES')
		print(x, x, y)


rr = input
rri = lambda : int(rr())
rrm = lambda : list(map(int, rr().split()))

def solve(a, b, c):
	check = set([a, b, c])
	if len(check) == 3:
		return []
	elif len(check) == 1:
		return [a] * 3
	else:
		big = max(check)
		small = min(check)
		ind = [i for i in range(3) if [a, b, c][i] == big]
		if len(ind) == 1:
			return []
		ans = [1] * 3
		if ind == [0, 1]:
			ans[0] = big
			ans[1] = small
		elif ind == [0, 2]:
			ans[1] = big
			ans[0] = small
		else:
			ans[2] = big
			ans[0] = small
	return ans
T = rri()
for i in range(1, T + 1):
	(a, b, c) = rrm()
	ans = solve(a, b, c)
	if ans == []:
		print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(ans[0], ans[1], ans[2]))


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	l = []
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	if l[-2] == l[-1]:
		print('YES')
		print(max(l), min(l), min(l))
	else:
		print('NO')


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
mod = 10 ** 9 + 7
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]), reverse=True)

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	max_so_far = -sys.maxsize - 1
	max_ending_here = 0
	start = 0
	end = 0
	s = 0
	for i in range(0, size):
		max_ending_here += a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
			start = s
			end = i
		if max_ending_here < 0:
			max_ending_here = 0
			s = i + 1
	return (max_so_far, start, end)

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] >= arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def solve():
	(a, b, c) = num_input()
	arr = list(set([a, b, c]))
	if len(arr) == 3:
		print('NO')
	elif len(arr) == 1:
		print('YES')
		print(a, a, a)
	else:
		maxx = max(a, b, c)
		minn = min(a, b, c)
		count = 0
		if a == maxx:
			count += 1
		if b == maxx:
			count += 1
		if c == maxx:
			count += 1
		if count == 2:
			print('YES')
			print(minn, minn, maxx)
		else:
			print('NO')
t = 1
t = int(input())
for _ in range(t):
	solve()


import math
from sys import stdin
from collections import Counter, defaultdict, deque
input = stdin.readline
mod = pow(10, 9) + 7

def solve():
	(a, b, c) = map(int, input().split())
	max1 = max(a, b, c)
	if max1 == a:
		if a == c:
			print('YES')
			print(a, b, b)
			return
	if max1 == b:
		if b == a:
			print('YES')
			print(c, b, c)
			return
	if max1 == c:
		if c == b:
			print('YES')
			print(a, a, c)
			return
	print('NO')
for _ in range(int(input())):
	solve()


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = 0
	b = 0
	c = 0
	d = 0
	if x != y and y != z and (x != z):
		d = 1
	elif y == z and x > y:
		d = 1
	elif x == z and x < y:
		d = 1
	elif x == y and z > x:
		d = 1
	elif x == y and y == z:
		a = x
		b = y
		c = z
	elif y == z and x < y:
		a = x
		b = x
		c = z
	elif x == z and x > y:
		a = x
		b = y
		c = y
	else:
		a = x
		b = z
		c = z
	if d == 1:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


for _ in range(int(input())):
	a = list(map(int, input().split()))
	if len(list(set(a))) == 1:
		print('YES')
		print(a[0], a[0], a[0])
	elif len(list(set(a))) == 2:
		v = max(a)
		e = min(a)
		ct = 0
		ind = []
		for i in range(3):
			if a[i] == v:
				ct += 1
			else:
				ind.append(i)
		if ct == 1:
			print('NO')
		elif ct == 2:
			if ind[0] == 0:
				print('YES')
				print(e, e, v)
			elif ind[0] == 1:
				print('YES')
				print(v, e, e)
			else:
				print('YES')
				print(e, v, e)
	else:
		print('NO')


for _ in range(int(input())):
	abc = tuple((int(i) for i in input().split()))
	print((0, 'NO', 'YES\n{0} {1} {1}'.format(max(abc), min(abc)), 'YES\n{0} {0} {0}'.format(abc[0]))[abc.count(max(abc))])


t = int(input())
listTest = []
for i in range(t):
	xyz = input()
	xyz = xyz.split()
	listTest.append(xyz)
for item in listTest:
	if item[0] != item[1] and item[1] != item[2] and (item[2] != item[0]):
		print('NO')
	elif item[0] == item[1] and item[1] == item[2] and (item[2] == item[0]):
		c = int(item[1])
		a = int(item[1])
		b = int(item[1])
		print('YES')
		print(a, b, c)
	elif item[0] == item[1] and int(item[1]) > int(item[2]):
		a = int(item[0])
		b = int(item[2])
		c = int(item[2])
		print('YES')
		print(a, b, c)
	elif item[0] == item[2] and int(item[2]) > int(item[1]):
		b = int(item[0])
		a = int(item[1])
		c = int(item[1])
		print('YES')
		print(a, b, c)
	elif item[1] == item[2] and int(item[2]) > int(item[0]):
		c = int(item[1])
		a = int(item[0])
		b = int(item[0])
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
input_list = [[0, 0, 0] for i in range(t)]
for i in range(t):
	(x, y, z) = input().split()
	input_list[i][0] = int(x)
	input_list[i][1] = int(y)
	input_list[i][2] = int(z)
ans_list = ['NO' for i in range(t)]
output_list = [[0, 0, 0] for i in range(t)]
for i in range(t):
	(x, y, z) = input_list[i]
	if x == y and x >= z:
		a = x
		b = z
		c = z
		output_list[i] = (a, b, c)
		ans_list[i] = 'YES'
	elif x == z and x >= y:
		b = x
		a = y
		c = y
		output_list[i] = (a, b, c)
		ans_list[i] = 'YES'
	elif y == z and y >= x:
		c = y
		b = x
		a = x
		output_list[i] = (a, b, c)
		ans_list[i] = 'YES'
for i in range(t):
	if ans_list[i] == 'NO':
		print(ans_list[i], end='\n')
	if ans_list[i] == 'YES':
		print(ans_list[i], end='\n')
		for j in range(len(output_list[i])):
			print(output_list[i][j], end=' ')
		print()


for tt in range(int(input())):
	l = list(map(int, input().split()))
	st = set(l)
	flag = True
	m = min(l)
	if len(st) == 1:
		print('YES')
		print(l[0], l[1], l[2])
	elif len(st) == 2 and l.count(m) == 1:
		print('YES')
		print(max(l), min(l), min(l))
	else:
		print('NO')


def soln(a, b, c, x, y, z):
	return max(a, b) == x and max(a, c) == y and (max(b, c) == z)
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	ax = bx = x
	ay = cy = y
	bz = cz = z
	flag = False
	ans = []
	if soln(ax, bx, cy, x, y, z):
		ans = [ax, bx, cy]
	if soln(ax, bx, cz, x, y, z):
		ans = [ax, bx, cz]
	if soln(ax, bz, cy, x, y, z):
		ans = [ax, bz, cy]
	if soln(ax, bz, cz, x, y, z):
		ans = [ax, bz, cz]
	if soln(ay, bx, cy, x, y, z):
		ans = [ay, bx, cy]
	if soln(ay, bx, cz, x, y, z):
		ans = [ay, bx, cz]
	if soln(ay, bz, cy, x, y, z):
		ans = [ay, bz, cy]
	if soln(ay, bz, cz, x, y, z):
		ans = [ay, bz, cz]
	if ans:
		print('YES')
		print(*ans)
	else:
		print('NO')


import sys
input = sys.stdin.readline
Q = int(input())
for _ in range(Q):
	(x, y, z) = map(int, input().split())
	ans = []
	if x == y and x >= z:
		ans = [x, z, z]
	elif y == z and z >= x:
		ans = [x, x, y]
	elif z == x and x >= y:
		ans = [y, z, y]
	if not ans:
		print('NO')
	else:
		print('YES')
		print(*ans)


import math
import os
import random
import re
import sys
from collections import defaultdict
case = int(input())
for i in range(case):
	a = [int(x) for x in input().split()]
	(x, y, z) = (a[0], a[1], a[2])
	ara = [a[0], a[1], a[2]]
	flg = False
	for i in range(3):
		for j in range(3):
			for k in range(3):
				ara = [a[i], a[j], a[k]]
				if a[0] == max(ara[0], ara[1]) and a[1] == max(ara[0], ara[2]) and (a[2] == max(ara[1], ara[2])):
					flg = True
					print('YES')
					for item in ara:
						print(item, ' ', end='')
					print()
					break
			if flg:
				break
		if flg:
			break
	if not flg:
		print('NO')


from math import log2, ceil, floor
from collections import defaultdict, OrderedDict, Counter, deque
from heapq import heappush, heappop, heapify

def str_inp():
	return input()

def list_inp():
	return list(map(int, input().split()))

def map_inp():
	return map(int, input().split())

def int_inp():
	return int(input())

def float_int():
	return float(input())

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
for _ in range(int_inp()):
	(x, y, z) = map_inp()
	a = sorted([x, y, z])
	if a[0] == 1:
		if a[1] != a[2]:
			print('NO')
		else:
			print('YES')
			print(1, 1, a[1])
	elif a[0] == a[1] == a[2]:
		print('YES')
		print(a[0], a[0], a[0])
	elif a[0] != a[1] != a[2] and a[0] != a[2]:
		print('NO')
	elif a[0] == a[1] and a[1] != a[2]:
		print('NO')
	elif a[0] != a[1] and a[1] == a[2]:
		print('YES')
		print(a[1], a[0], a[0] - 1)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (z != x):
		print('NO')
	else:
		l = []
		f = min(x, y, z)
		l.append(x)
		l.append(y)
		l.append(z)
		e = max(set(l), key=l.count)
		if e > f or (x == y and y == z and (z == x)):
			print('YES')
			print(e, f, f, end='')
		else:
			print('NO')
		print()


n = int(input())
for i in range(n):
	ar = list(map(int, input().split()))
	num = len(ar)
	done = False
	for j in range(num):
		for m in range(j + 1, num):
			if done:
				break
			s = sum(ar)
			if ar[j] == ar[m] and int(ar[j]) >= s - ar[m] * 2:
				print('YES')
				print(ar[m], s - ar[m] * 2, s - ar[m] * 2)
				done = True
	if done == False:
		print('NO')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	x = li()
	if x.count(max(x)) >= 2:
		print('YES')
		print(max(x), min(x), min(x))
	else:
		print('NO')


t = int(input())
while t:
	nums = list(map(int, input().split(' ')))
	x = nums[0]
	y = nums[1]
	z = nums[2]
	if x == y and y == z:
		print('Yes')
		print(x, y, z)
	elif nums.count(max(nums)) == 2:
		print('Yes')
		print(max(nums), min(nums), 1)
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	arr = [int(i) for i in input().split()]
	if arr.count(max(arr)) == 2:
		print('YES')
		print(max(arr), min(arr), 1)
	elif arr.count(max(arr)) == 3:
		print('YES')
		print(arr[0], arr[1], arr[2])
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().strip()
for _ in range(int(input())):
	(a, b, c) = sorted(list(map(int, input().split())))
	if b != c:
		print('NO')
	else:
		print('YES')
		print(a, a, c)


def s1(a, b, c):
	print('YES')
	print(a, b, c)

def s2():
	print('NO')
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		s1(x, x, x)
	elif x == y or y == z or x == z:
		if x == y:
			(a, b) = (x, z)
		if x == z:
			(a, b) = (x, y)
		if y == z:
			(a, b) = (y, x)
		if b > a:
			s2()
		else:
			if b == 1:
				c = 1
			else:
				c = b - 1
			s1(a, b, c)
	else:
		s2()


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))
ans = 0

def dfs(visited, node, digits, tree):
	if not visited[node]:
		visited[node] = True
		digits += str(node)
		leafNode = True
		for child in tree[node]:
			leafNode = False
			dfs(visited, child, digits, tree)
		if leafNode:
			global ans
			ans += int(digits)

def main():
	(x, y, z) = vars()
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y and x > z:
		print('YES')
		print(x, z, z)
	elif y == z and y > x:
		print('YES')
		print(x, x, y)
	elif x == z and x > y:
		print('YES')
		print(y, x, y)
	else:
		print('NO')
t = int(input())
for _ in range(t):
	main()


t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	f = 1
	if x != y and y != z and (x != z):
		print('NO')
	else:
		if x == y:
			if z > x:
				print('NO')
				f = 0
			else:
				print('YES')
				(a, b, c) = (x, z, 1)
		elif x == z:
			if y > x:
				print('NO')
				f = 0
			else:
				print('YES')
				(b, a, c) = (x, y, 1)
		elif z == y:
			if z < x:
				print('NO')
				f = 0
			else:
				print('YES')
				(c, b, a) = (y, x, 1)
		if f:
			print('%d %d %d' % (a, b, c))
	t -= 1


for _ in range(int(input())):
	(x, y, z) = [int(k) for k in input().split()]
	ans = [0 for k in range(3)]
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y and x >= z:
		print('YES')
		print(x, end=' ')
		print(z, end=' ')
		print(z)
	elif x == z and z >= y:
		print('YES')
		print(x, end=' ')
		print(y, end=' ')
		print(y)
	elif y == z and z >= x:
		print('YES')
		print(z, end=' ')
		print(x, end=' ')
		print(x)
	else:
		print('NO')


def factor(n):
	f = {}
	while n % 2 == 0:
		f[2] = f.get(2, 0) + 1
		n /= 2
	d = 3
	while d * d <= n:
		while n % d == 0:
			f[d] = f.get(d, 0) + 1
			n /= d
		d += 2
	if n > 1:
		f[n] = f.get(n, 0) + 1
	return f

def even(n):
	if n % 2 == 0:
		return True
	return False

def gcd(a, b):
	small = 0
	gcd = 0
	i = 1
	if a > b:
		small = b
	else:
		small = a
	while i < small:
		if a % i == 0 and b % i == 0:
			gcd = i
		i += 1
	return gcd
n = int(input())
for i in range(0, n):
	x = list(map(int, input().split()))
	x.sort()
	if x[2] != x[1]:
		print('NO')
		continue
	print('YES')
	a = min(x[2], x[1])
	b = min(x[1], x[0])
	c = min(x[2], x[0])
	print(a, b, c)


def maxx(x, y, z):
	if len(set([x, y, z])) == 3:
		print('NO')
	else:
		a = min(x, y, z)
		b = max(x, y, z)
		c = 0
		for i in (x, y, z):
			if i == a:
				c += 1
		if c == 2:
			print('NO')
		else:
			print('YES')
			print(max(x, y, z), min(x, y, z), min(x, y, z))
t = int(input())
for i in range(t):
	(x, y, z) = [int(j) for j in input().split()]
	maxx(x, y, z)


t = int(input())
for p in range(t):
	a = list(map(int, input().split()))
	a.sort()
	x = a[0]
	y = a[1]
	z = a[2]
	if x == y or y == z or z == x:
		if x == y and y == z and (z == x):
			print('YES')
			print(str(x) + ' ' + str(y) + ' ' + str(z))
		elif x < y and y == z:
			print('YES')
			z = 1
			print(str(x) + ' ' + str(y) + ' ' + str(z))
		else:
			print('NO')
	else:
		print('NO')


def test():
	n = list(map(int, input().split(' ')))
	n.sort(reverse=True)
	if n[0] == n[1]:
		print('YES')
		print(n[0], n[2], n[2])
	else:
		print('NO')
for _ in range(int(input())):
	test()


import sys

def readStr():
	return sys.stdin.readline().rstrip()

def readInts():
	return list(map(int, readStr().split(' ')))

def main(x, y, z):
	s = sorted([x, y, z])
	if s[1] == s[2]:
		return (True, s[1], s[0], 1)
	else:
		return (False, None, None, None)
(t,) = readInts()
for _ in range(t):
	(x, y, z) = readInts()
	(f, a, b, c) = main(x, y, z)
	if f:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


import itertools

def solve():
	A = tuple(map(int, input().split()))
	(x, y, z) = A
	for (a, b, c) in itertools.product(A, repeat=3):
		if max(a, b) == x and max(a, c) == y and (max(c, b) == z):
			print('YES')
			print(a, b, c)
			return
	print('NO')
	return

def main():
	t = int(input())
	for i in range(t):
		solve()
	return
main()


def main():
	t = int(input())
	for _ in range(t):
		(x, y, z) = map(int, input().split())
		xyz = sorted([x, y, z], reverse=True)
		if xyz[0] != xyz[1]:
			print('NO')
		else:
			print('YES')
			if x == y:
				print(x, z, z)
			elif x == z:
				print(y, z, y)
			else:
				print(x, x, y)
main()


x = int(input())
for i in range(x):
	l = list(map(int, input().split()))
	if len(set(l)) != 3:
		if l.count(max(l)) >= 2:
			print('YES')
			print(max(l), min(l), min(l))
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	d = {}
	d[x] = d[y] = d[z] = 0
	d[x] += 1
	d[y] += 1
	d[z] += 1
	if 3 in d.values():
		print('YES')
		print(x, x, x)
	elif 2 in d.values():
		z = sorted(list(map(lambda x: list(reversed(x)), d.items())))
		if z[0][1] > z[1][1]:
			print('NO')
		else:
			print('YES')
			print(z[1][1], z[0][1], z[0][1])
	else:
		print('NO')


def num():
	return int(input())

def line():
	return map(int, input().split())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	q = list(line())
	(mx, mn) = (max(q), min(q))
	z = sum((x == mx for x in q))
	ans = [mx, mn, mn]
	if z < 2:
		print('NO')
	else:
		print('YES')
		print(' '.join(map(str, ans)))


t = int(input(''))
for t in range(0, t):
	(q, r, s) = input('').split(' ')
	x = int(q)
	y = int(r)
	z = int(s)
	if x != y and x != z and (y != z):
		print('NO')
	elif y == z and x > y or (z == x and y > x) or (x == y and z > y):
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))


import sys
input = sys.stdin.buffer.readline
a = int(input())
for x in range(a):
	(b, c, d) = map(int, input().split())
	if b == c == d:
		print('YES')
		print(b, c, d)
	elif b == c:
		if d > c:
			print('NO')
		else:
			print('YES')
			print(d, d, b)
	elif c == d:
		if c < b:
			print('NO')
		else:
			print('YES')
			print(b, b, c)
	elif b == d:
		if c > d:
			print('NO')
		else:
			print('YES')
			print(b, c, 1)
	else:
		print('NO')


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	(x, y, z) = get_tuple()
	(a, b, c) = (1, 1, 1)
	if x == y:
		a = x
	else:
		b = x
		c = y
	if y == z:
		c = y
	else:
		a = y
		b = z
	if x == z:
		b = x
	else:
		a = x
		c = 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')

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


t = int(input())
while t > 0:
	(_x, _y, _z) = input().split(' ')
	(x, y, z) = (int(_x), int(_y), int(_z))
	lst_1 = [x, y, z]
	lst_1.sort()
	lst_2 = [min(lst_1[0], lst_1[1]), min(lst_1[1], lst_1[2]), min(lst_1[0], lst_1[2])]
	lst_3 = [max(lst_2[0], lst_2[1]), max(lst_2[1], lst_2[2]), max(lst_2[0], lst_2[2])]
	lst_3.sort()
	if lst_3 != lst_1:
		print('NO')
	else:
		print('YES')
		print(lst_2[0], lst_2[1], lst_2[2])
	t -= 1


import sys
line = sys.stdin.readline

def answer(nums):
	nums = [int(x) for x in nums.split(' ')]
	x = nums[0]
	y = nums[1]
	z = nums[2]
	set_size = len(set(nums))
	if set_size == 3:
		print('NO')
	elif set_size == 1:
		print('YES')
		print(x, x, x)
	elif x == y and x > z:
		print('YES')
		print(x, z, z)
	elif x == z and x > y:
		print('YES')
		print(x, y, y)
	elif y == z and y > x:
		print('YES')
		print(x, y, x)
	else:
		print('NO')
for i in range(int(line())):
	line = sys.stdin.readline
	answer(line())


t = int(input())
for _ in range(t):
	S = list(map(int, input().split()))
	S.sort()
	S.reverse()
	a = max(S)
	if S.count(a) < 2:
		print('NO')
	else:
		print('YES')
		print(S[0], S[2], 1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	for t in range(int(input())):
		l = [int(j) for j in input().split()]
		l.sort(reverse=True)
		if l[0] != l[1]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[2], l[2])
main()


t = int(input())
a = []
for i in range(t):
	a.append([])
	a[i] = [int(a[i]) for a[i] in input().split()]
res = []
for i in range(t):
	x = a[i][0]
	y = a[i][1]
	z = a[i][2]
	m = []
	m = [x, y, z]
	m.sort(key=None, reverse=False)
	if m[2] == m[1]:
		res.append([m[2], m[0], 1])
	else:
		res.append(0)
for i in range(t):
	if res[i] == 0:
		print('NO')
	else:
		print('YES')
		for j in range(3):
			print(res[i][j], end=' ')
		print('')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
		continue
	s = sorted([x, y, z], reverse=True)
	if s[0] != s[1]:
		print('NO')
		continue
	print('YES')
	print(s[0], s[2], s[2])


from sys import *
from bisect import bisect_left
input = lambda : stdin.readline()
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)
for _ in range(int(input())):
	lst = int_arr()
	lst.sort()
	if lst[-1] == lst[-2]:
		print('YES')
		print(lst[0], lst[0], lst[2])
	else:
		print('NO')


T = int(input())
for _ in range(T):
	xyz = list(map(int, input().strip().split()))
	xyz.sort()
	(x, y, z) = xyz
	if y != z:
		print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(x, x, z))


t = int(input())
for testcase in range(t):
	(x, y, z) = [int(i) for i in input().split(' ')]
	if x > y:
		(x, y) = (y, x)
	if x > z:
		(x, z) = (z, x)
	if y > z:
		(y, z) = (z, y)
	if y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
from bisect import bisect_left, bisect_right
for _ in range(int(input())):
	l = map(int, input().split())
	t = list(l)
	l = set(t)
	if len(l) == 3:
		print('NO')
	elif len(l) == 1:
		l = list(l)
		print('YES')
		print(l[0], l[0], l[0])
	else:
		(a, b) = list(l)
		f = t.count(a)
		r = 3 - f
		if max(a, b) == a:
			if f == 2:
				print('YES')
				print(a, b, b)
			else:
				print('NO')
		elif r == 2:
			print('YES')
			print(a, b, a)
		else:
			print('NO')


n = int(input())
values = []
for _ in range(n):
	values.append(list(map(int, input().split())))
ret = []
for v in values:
	MAX = max(v)
	MIN = min(v)
	if v.count(MAX) == 2:
		ret.append('YES\n{} {} {}'.format(MAX, MIN, MIN))
	elif v.count(MAX) == 3:
		ret.append('YES\n{} {} {}'.format(MAX, MAX, MAX))
	else:
		ret.append('NO')
print('\n'.join(ret))


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


def solve(x, y, z):
	if z == max(x, y):
		print('YES')
		return [z, min(x, y), min(x, y)]
	elif x == y and z < x:
		print('YES')
		return [x, z, z]
	else:
		return ['NO']
t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	print(*solve(x, y, z))
	t -= 1


def maximum(x, y, z):
	values = [x, y, z]
	values.sort()
	if values[1] != values[2]:
		print('NO')
	else:
		print('YES')
		print(values[0], values[0], values[2])
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	maximum(x, y, z)


for teat in range(int(input())):
	(x, y, z) = map(int, input().split())
	lt = [x, y, z]
	lt.sort()
	if lt[1] == lt[2] and lt[1] >= lt[0]:
		print('YES')
		print(max(x, y, z), min(z, y, x), 1)
	else:
		print('NO')


def main():
	for i in range(int(input())):
		arr = list(map(int, input().split()))
		arr.sort()
		if arr[1] != arr[2]:
			print('NO')
		else:
			print('YES')
			print(arr[2], arr[0], arr[0])
main()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())

def main():
	(x, y, z) = mpint()
	arr = sorted([x, y, z])
	for i in range(3):
		for j in range(3):
			for k in range(3):
				a = arr[i]
				b = arr[j]
				c = arr[k]
				if max(a, b) == x and max(a, c) == y and (max(c, b) == z):
					print('YES')
					print(a, b, c)
					return
	print('NO')
for case in range(itg()):
	main()


def main():
	for _ in range(int(input())):
		a = list(map(int, input().split()))
		m = max(a)
		if a.count(m) == 3:
			print('YES')
			print(m, m, m)
		elif a.count(m) == 2:
			print('YES')
			z = a.index(m)
			b = sorted(a)
			if m == a[0] == a[1]:
				print(m, b[0], b[0])
			elif m == a[1] == a[2]:
				print(b[0], b[0], m)
			else:
				print(b[0], m, b[0])
		else:
			print('NO')
main()


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	x = int(l1[0])
	y = int(l1[1])
	z = int(l1[2])
	pos = False
	if x == y == z:
		print('YES')
		print(x, y, z)
	else:
		if x == y:
			if z > x:
				print('NO')
			elif x - 1 <= 0:
				print('NO')
			else:
				b = c = z
				print('YES')
				print(x, b, c)
		if x > y:
			if z != x:
				print('NO')
			else:
				b = z
				if b - 1 > 0:
					print('YES')
					a = c = y
					print(a, b, c)
				else:
					print('NO')
		if x < y:
			if z != y:
				print('NO')
			else:
				c = y = z
				if c - 1 > 0:
					print('YES')
					print(x, x, c)
				else:
					print('NO')


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	copy = lst
	lst = list(set(lst))
	if len(lst) == 1:
		print('YES')
		for i in range(3):
			print(lst[0], end=' ')
		print()
	elif len(lst) == 2:
		a = -1
		b = -1
		c = -1
		if copy[0] == copy[1]:
			a = copy[0]
			if copy[2] > a:
				print('NO')
			else:
				print('YES')
				print(max(copy), end=' ')
				print(min(copy), end=' ')
				print(min(copy))
		elif copy[0] == copy[2]:
			b = copy[0]
			if copy[1] <= copy[0]:
				print('YES')
				print(max(copy), end=' ')
				print(min(copy), end=' ')
				print(min(copy))
			else:
				print('NO')
		elif copy[1] == copy[2]:
			c = copy[1]
			if copy[0] <= c:
				print('YES')
				print(min(copy), end=' ')
				print(min(copy), end=' ')
				print(max(copy))
			else:
				print('NO')
	elif len(lst) == 3:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == b and b == c and (c == a):
		print('YES')
		print(a, b, c)
	elif a != b and b != c and (c != a):
		print('NO')
	else:
		l = []
		l.append(a)
		l.append(b)
		l.append(c)
		l.sort(reverse=True)
		if l[0] != l[1]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[2], 1)


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	(x, y, z) = map(int, stdin.readline().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x != y and y != z and (x != z):
		print('NO')
		continue
	a = sorted([x, y, z])
	if a[0] == a[1]:
		print('NO')
		continue
	print('YES')
	print(a[2], a[0], 1)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	x = list(map(int, input().split()))
	x.sort()
	if x[0] == x[1] == x[2]:
		print('YES')
		print(x[0], x[0], x[0])
	elif x[1] == x[2]:
		print('YES')
		print(x[2], x[0], x[0])
	else:
		print('NO')


def solve():
	(x, y, z) = list(map(int, input().split()))
	m = min(x, y, z)
	M = max(x, y, z)
	if z == x and y == x:
		print('YES')
		print(x, x, x)
	elif x == y or x == z or y == z:
		min_count = 0
		min_count += 1 if x == m else 0
		min_count += 1 if y == m else 0
		min_count += 1 if z == m else 0
		if min_count > 1:
			print('NO')
		else:
			print('YES')
			print(M, m, m)
	else:
		print('NO')
t = int(input())
for test in range(t):
	solve()


T = int(input())
while T:
	L = list(map(int, input().split()))
	L.sort()
	(x, y, z) = (L[0], L[1], L[2])
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x != y and y != z:
		print('NO')
	elif x == y:
		print('NO')
	else:
		print('YES')
		print(z, x, 1)
	T = T - 1


t = int(input())
while t > 0:
	L = list(map(int, input().split()))
	L.sort(reverse=True)
	ans = [[L[2], L[1]], [L[1], L[2]], [L[2], L[2]]]
	if max(ans[0]) == L[0] and max(ans[1]) == L[1] and (max(ans[2]) == L[2]):
		print('YES')
		print(L[2], L[1], L[2])
	else:
		print('NO')
	t -= 1


for t in range(int(input())):
	a = list(map(int, input().split()))
	c = 0
	for v in a:
		if max(a) == v:
			c += 1
	if c >= 2 and len(set(a)) <= 2:
		print('YES')
		if len(set(a)) == 1:
			print(*a)
		else:
			a.sort()
			print(a[0], a[1], 1)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	c = [x, y, z]
	l = list(set([x, y, z]))
	if len(l) == 3:
		print('NO')
	elif len(l) == 2:
		if c.count(max(c)) == 2:
			l.sort()
			if l[0] - 1:
				print('YES')
				print(l[0] - 1, l[0], l[1])
			else:
				print('YES')
				print(l[0], l[0], l[1])
		else:
			print('NO')
	elif len(l) == 1:
		print('YES')
		print(x, y, x)


for x in [*open(0)][1:]:
	x = list(map(int, x.split()))
	if x.count(max(x)) >= 2:
		print('YES')
		print(str(max(x)) + ' ' + str(min(x)) + ' ' + str(min(x)))
	else:
		print('NO')


t = int(input())
for i in range(t):
	l = sorted(map(int, input().split()))
	if l[1] == l[2]:
		print('YES')
		print(l[0], l[0], l[1])
	else:
		print('NO')


from sys import stdin
t = int(stdin.readline())
for i in range(t):
	(x, y, z) = map(int, stdin.readline().split())
	if x == y and z <= x:
		print('YES')
		print(x, z, z)
	elif y == z and x <= z:
		print('YES')
		print(x, x, z)
	elif x == z and y <= z:
		print('YES')
		print(z, y, y)
	else:
		print('NO')


def answer(x, y, z):
	flag = [-1]
	if x == y and y == z:
		return ('YES', [x, x, x])
	elif x == y:
		if z > x:
			return ('NO', flag)
		else:
			return ('YES', [x, z, z])
	elif y == z:
		if x > y:
			return ('NO', flag)
		else:
			return ('YES', [x, x, y])
	elif x == z:
		if y > x:
			return ('NO', flag)
		else:
			return ('YES', [y, y, x])
	else:
		return ('NO', flag)
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	(a, b) = answer(x, y, z)
	if a == 'YES':
		print(a)
		print(*b)
	else:
		print(a)


def solve():
	(x, y, z) = list(map(int, input().split()))
	if x == y and z < y:
		print('YES')
		print(z, x, z)
	elif y == z and x < y:
		print('YES')
		print(x, x, y)
	elif x == z and y < x:
		print('YES')
		print(x, y, y)
	elif x == y and y == z:
		print('YES')
		print(x, x, x)
	else:
		print('NO')
t = int(input())
while t:
	t -= 1
	solve()


n = int(input())
for i in range(1, n + 1):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
		continue
	if x > y and x > z or (y > x and y > z) or (z > x and z > y):
		print('NO')
		continue
	print('YES')
	if x == y and x > z:
		print(x, z, z)
	elif x == z and x > y:
		print(y, x, y)
	elif y == z and y > x:
		print(x, x, z)
	else:
		print(x, x, x)


import random

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	x = list(map(int, input().split()))
	x.sort()
	if x[2] != x[1]:
		print('NO')
	else:
		print('YES')
		print(x[2], x[0], 1)


def check(l):
	if len(set(l)) != 3:
		if len(set(l)) == 1:
			print('YES')
			print(' '.join(list(map(str, l))))
		else:
			temp = sorted(set(l))
			if l.count(temp[1]) != 2:
				print('NO')
			else:
				temp.append(1)
				print('YES')
				print(' '.join(list(map(str, temp))))
	else:
		print('NO')
t = int(input())
for i in range(t):
	a = input().split(' ')
	a = list(map(int, a))
	check(a)


for _ in range(int(input())):
	a = list(map(int, input().split()))
	if len(set(a)) == 3:
		print('NO')
	elif len(set(a)) == 1:
		print('YES')
		print(*a)
	else:
		a.sort()
		f_ = a.count(a[0])
		s_ = a.count(a[-1])
		if f_ < s_:
			print('YES')
			print(a[0], a[0], a[1])
		else:
			print('NO')


import collections
testcases = int(input())
for t in range(testcases):
	(x, y, z) = map(int, input().split())
	cnt = collections.Counter([x, y, z])
	common = cnt.most_common()
	if len(common) == 3:
		print('NO')
	elif len(common) == 2:
		group = common[0][0]
		distinct = common[1][0]
		if group < distinct:
			print('NO')
		else:
			a = group
			b = distinct
			c = b
			if c <= 0:
				print('NO')
			else:
				print('YES')
				print(a, b, c)
	else:
		print('YES')
		print(x, y, z)


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		(x, y, z) = mi()
		if x == y and x == z:
			print('YES')
			print(x, x, x)
		elif x == y:
			if z < x:
				print('YES')
				print(x, z, z)
			else:
				print('NO')
		elif x == z:
			if y < z:
				print('YES')
				print(y, x, y)
			else:
				print('NO')
		elif y == z:
			if x < z:
				print('YES')
				print(x, x, y)
			else:
				print('NO')
		else:
			print('NO')
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


t = int(input())
for i in range(t):
	l = [int(i) for i in input().split()]
	l.sort()
	if l[2] == l[1]:
		print('YES')
		print(str(l[0]) + ' 1 ' + str(l[2]))
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	l = []
	c = {}
	l.append(x)
	l.append(y)
	l.append(z)
	l = sorted(l)
	if l[len(l) - 1] == l[len(l) - 2]:
		print('YES')
		if len(set(l)) == 1:
			print(l[0], l[0], l[0])
		else:
			print('1', *set(l))
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = list(map(int, input().split()))
	c = n[0]
	b = n[0]
	for i in range(2):
		s = n[i + 1]
		if c < s:
			c = s
		if b > s:
			b = s
	cnt = n.count(b)
	if cnt == 2:
		print('NO')
	elif c != b and cnt == n.count(c):
		print('NO')
	else:
		print('YES')
		print(c, b, b)


t = int(input())
teszt = []
for i in range(t):
	eset = [int(i) for i in input().split()]
	teszt.append(eset)
for i in range(t):
	jo = False
	x = teszt[i][0]
	y = teszt[i][1]
	z = teszt[i][2]
	if x == y and x >= z:
		jo = True
		a = x
		b = z
		c = z
	elif x == z and x >= y:
		jo = True
		a = x
		b = y
		c = y
	elif z == y and z >= x:
		jo = True
		a = x
		b = x
		c = z
	if jo:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(x, y, z) = [int(i) for i in input().split()]
	m = max(x, y, z)
	mn = min(x, y, z)
	co = [x, y, z].count(m)
	if co == 1:
		print('NO')
	else:
		print('YES')
		if co == 3:
			print(m, m, m)
		else:
			print(mn, mn, m)


t = int(input())
for i in range(t):
	(x, y, z) = [int(x) for x in input().split()]
	x1 = max(x, y)
	y1 = max(y, z)
	z1 = max(x, z)
	m = min(x, y, z)
	if x1 != y1 or z1 != y1:
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), m, m)


from collections import Counter, defaultdict, deque
import sys
input = sys.stdin.readline

def solve():
	(x, y, z) = sorted([int(x) for x in input().split()])
	if y != z:
		print('no')
	else:
		print('yes')
		print(1, x, z)
tt = int(input())
for test in range(tt):
	solve()


from sys import stdin, stdout
import sys
INF = 100000000000.0
import bisect

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()

def op(c):
	return stdout.write(c)
from collections import defaultdict
import math
for t in range(int(stdin.readline())):
	a = get_array()
	a.sort(reverse=True)
	if a[0] == a[1] or a[0] == a[1] == a[2]:
		print('YES')
		print(a[0], a[2], a[2])
	else:
		print('NO')


for testcases in range(1, int(input()) + 1):
	(a, b, c) = map(int, input().split())
	x = max(a, b, c)
	if a == b or a == c or b == c:
		if a + b + c - x != 2 * min(a, b, c) or a == b == c:
			print('YES')
			print(x, min(a, b, c), min(a, b, c))
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	(a, b, c) = list(map(int, input().split()))
	if a <= 0 or b <= 0 or c <= 0:
		print('NO')
	elif a != b and b != c and (c != a):
		print('NO')
	else:
		mi = min(a, b, c)
		ma = max(a, b, c)
		if a == b and b == c:
			print('YES')
			print(a, a, a)
			continue
		if (a == b or a == c) and mi == a or ((a == b or b == c) and mi == b) or ((c == b or a == c) and mi == c):
			print('NO')
			continue
		print('YES')
		print(mi, mi, ma)


t = int(input())
for _ in range(t):
	xyz = list(map(int, input().split()))
	mx = max(xyz)
	if xyz.count(mx) < 2:
		print('NO')
	else:
		print('YES')
		other = xyz[0]
		for ele in xyz:
			if ele != mx:
				other = ele
		print(mx, 1, other)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	l.sort()
	x = l[0]
	y = l[1]
	z = l[2]
	if x == y and x == z:
		print('YES')
		print(x, x, x)
	elif x == y:
		print('No')
	elif y == z:
		print('YES')
		print(y, 1, x)
	else:
		print('No')


for _ in range(int(input())):
	b = list(map(int, input().split()))
	b.sort()
	if len({*b}) > 2:
		print('NO')
	elif b[len(b) - 1] > b[len(b) - 2]:
		print('NO')
	else:
		print('YES\n', b[0], b[0], b[len(b) - 1])


for _ in range(int(input())):
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]
	z = l[2]
	m = max(l)
	a = max(l)
	b = min(l)
	c = min(l)
	if l.count(m) < 2:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


t = int(input())
for tc in range(t):
	line = input().split()
	arr = [int(line[0]), int(line[1]), int(line[2])]
	arr.sort()
	if arr[-1] == arr[-2]:
		print('YES')
		print(arr[-1], arr[0], arr[0])
	else:
		print('NO')


import sys
inp = [int(x) for x in sys.stdin.read().split()]
ii = 0
t = inp[0]
ii += 1
ans = []
for _ in range(t):
	(x, y, z) = inp[ii:ii + 3]
	ii += 3
	if x == y >= z:
		print('YES')
		print(x, z, z)
	elif x == z >= y:
		print('YES')
		print(y, x, y)
	elif y == z >= x:
		print('YES')
		print(x, x, y)
	else:
		print('NO')


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
for _ in range(int(z())):
	(a, b, c) = sorted(list(map(int, z().split())))
	if b == c:
		print('YES')
		print(c, a, 1)
	else:
		print('NO')


def sol(lis):
	lis.sort()
	a = lis
	if a[1] != a[2]:
		print('NO')
		return
	print('YES')
	a = lis
	print(a[0], a[0], a[2])
k = int(input())
for i in range(k):
	lis = list(map(int, input().split(' ')))
	sol(lis)


t = int(input())
for i in range(t):
	l = []
	(x, y, z) = map(int, input().split())
	l.append(x)
	l.append(y)
	l.append(z)
	m = max(l)
	m1 = min(l)
	c = l.count(m)
	if c < 2:
		print('NO')
	else:
		print('YES')
		print(m, m1, m1)


def YES():
	print('YES')
	print(a, b, c)

def check():
	if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
		return True
	else:
		return False
T = int(input())
for t in range(T):
	(x, y, z) = map(int, input().split())
	b = x
	c = max(y, z)
	a = b
	if check():
		YES()
	else:
		b = max(x, z)
		c = y
		a = c
		if check():
			YES()
		else:
			a = x
			c = max(y, z)
			b = a
			if check():
				YES()
			else:
				a = max(x, y)
				c = z
				b = c
				if check():
					YES()
				else:
					b = max(x, z)
					a = y
					c = a
					if check():
						YES()
					else:
						a = max(x, y)
						b = z
						c = b
						if check():
							YES()
						else:
							print('NO')


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(x, y, z):
	a = [x, y, z]
	c = a.count(max(a))
	if c == 1:
		return None
	if c == 3:
		return a
	if x == y:
		return [x, z, z]
	if x == z:
		return [y, x, y]
	return [x, x, y]
for _ in tests():
	(x, y, z) = arr_in()
	result = solve(x, y, z)
	bool_out(result)
	if result:
		arr_out(result)


n = int(input())
for w in range(n):
	l = list(map(int, input().split()))
	m = max(l)
	z = []
	if l.count(m) == 3:
		z = [m] * 3
		print('YES')
		for j in range(3):
			print(z[j], end=' ')
		print()
	elif l.count(m) == 2:
		z = [m] * 1
		x = min(l)
		z.append(x)
		z.append(x)
		print('YES')
		for j in range(3):
			print(z[j], end=' ')
		print()
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	d = max(x, y, z)
	f = min(x, y, z)
	if x == y and x == d or (x == z and x == d) or (y == z and y == d):
		print('YES')
		print(d, f, f)
	else:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = [int(x) for x in input().split()]
	a = []
	a.append(x)
	a.append(y)
	a.append(z)
	a.sort()
	if a[0] == a[1] and a[0] == a[2]:
		print('YES')
		print(a[0], a[1], a[2])
	elif len(a) == len(set(a)):
		print('NO')
	elif a[0] == a[1]:
		print('NO')
	elif a[0] != 1:
		print('YES')
		print(1, a[0], max(a))
	else:
		print('YES')
		print(1, 1, max(a))
	t -= 1


import math
from collections import *
import sys
from functools import reduce
from itertools import groupby

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
DIRECTIONS = [[0, 1], [0, -1], [1, 0], [1, -1]]
NEIGHBOURS = [(i, j) for i in range(-1, 2) for j in range(-1, 2) if i != 0 or j != 0]
OrdUnicode_a = ord('a')
OrdUnicode_A = ord('A')
CAPS_ALPHABETS = {chr(i + OrdUnicode_A): i for i in range(26)}
SMOL_ALPHABETS = {chr(i + OrdUnicode_a): i for i in range(26)}
MOD_JOHAN = int(1000000000.0) + 7
MOD_LIGHT = 998244353
INFINITY = float('inf')
MAXN_EYEPATCH = int(100000.0) + 1
MAXN_FULLMETAL = 501
for _testcases_ in range(int(input())):
	li = get_list()
	if li.count(max(li)) == 3:
		print('YES')
		print(*[max(li)] * 3)
	elif li.count(max(li)) == 2:
		print('YES')
		print(max(li), min(li), 1)
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	(x, y, z) = sorted(mp())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and y == z:
		print('YES')
		if x == 1:
			print(x, x, y)
		else:
			print(x - 1, x, y)
	else:
		print('NO')


n = int(input())
for _ in range(n):
	(x, y, z) = [int(i) for i in input().split(' ')]
	if len(set([x, y, z])) == 3 or [x, y, z].count(min(x, y, z)) == 2:
		print('NO')
	else:
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))


t = int(input())
cases = []
for i in range(t):
	cases.append(list(map(int, input().strip().split())))

def solve(case):
	(x, y, z) = case
	if [x, y, z].count(max(x, y, z)) >= 2:
		print('YES')
		print(min(x, y, z), min(x, y, z), max(x, y, z))
	else:
		print('NO')
for case in cases:
	solve(case)


testcase = int(input())
for _ in range(0, testcase):
	arr = list(map(int, input().split()))
	x = arr[0]
	y = arr[1]
	z = arr[2]
	maxa = max(max(x, y), max(y, z))
	mini = min(min(x, y), min(y, z))
	if maxa != y and maxa != z or (maxa != x and maxa != y) or (maxa != x and maxa != z):
		print('NO')
	else:
		print('YES' + '\n' + str(maxa) + ' ' + str(mini) + ' ' + str(1))


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	k = max(arr)
	l = 0
	for i in range(len(arr)):
		if arr[i] == k:
			l += 1
	if l == 2:
		for i in range(len(arr)):
			if arr[i] == k:
				arr[i] = 1
				break
		print('YES')
		arr = list(map(str, arr))
		s = ' '.join(arr)
		print(s)
	elif l == 3:
		print('YES')
		arr = list(map(str, arr))
		s = ' '.join(arr)
		print(s)
	else:
		print('NO')


for __ in range(int(input())):
	ar = list(map(int, input().split()))
	ar.sort()
	if ar[0] == ar[1] == ar[2]:
		print('YES')
		print(ar[0], ar[0], ar[0])
	elif ar[1] == ar[2]:
		print('YES')
		print(ar[1], ar[0], 1)
	else:
		print('NO')


z = int(input())
for o in range(z):
	a = list(map(int, input().split()))
	if a[0] != a[1] and a[0] != a[2] and (a[1] != a[2]):
		flag = 0
	else:
		m = a[0]
		n = a[0]
		if a[1] == a[0]:
			if a[2] > a[1]:
				flag = 0
			else:
				n = a[2]
				o = a[2]
				flag = 1
		if a[1] > a[0]:
			o = a[1]
			if a[2] < a[1]:
				flag = 0
			else:
				n = m
				flag = 1
		if a[1] < a[0]:
			n = a[0]
			if a[2] < a[0]:
				flag = 0
			else:
				flag = 1
				m = a[1]
				o = a[1]
	if flag == 0:
		print('NO')
	else:
		print('YES')
		print(m, end=' ')
		print(n, end=' ')
		print(o)


for _ in range(int(input())):
	mass = [int(i) for i in input().split()]
	mass.sort(reverse=True)
	if mass[0] != mass[1]:
		print('NO')
	else:
		print('YES')
		print(mass[1], mass[2], 1)


import sys
number_test = int(sys.stdin.readline())
for s in range(number_test):
	(x, y, z) = map(int, sys.stdin.readline().split(' '))
	a = max([x, y, z])
	nb = [x, y, z].count(a)
	if nb < 2:
		sys.stdout.write('NO' + '\n')
	elif nb == 3:
		sys.stdout.write('YES' + '\n' + str(a) + ' ' + str(a) + ' ' + str(a) + '\n')
	else:
		sys.stdout.write('YES' + '\n')
		c = 1
		b = min([x, y, z])
		sys.stdout.write(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')


tc = int(input())
for _ in range(tc):
	(x, y, z) = sorted(map(int, input().split()))
	if y == z:
		print('Yes')
		print(x, 1, z)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = list(map(int, input().split()))
	f = 0
	for a in [x, y, z]:
		for b in [x, y, z]:
			for c in [x, y, z]:
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					print('YES')
					print(a, b, c)
					f = 1
					break
			if f:
				break
		if f:
			break
	if f == 0:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	a = [x, y, z]
	if x != y and x != z and (y != z):
		print('No')
	elif x == y == z:
		print('Yes')
		print(x, y, z)
	elif a.count(min(a)) == 2:
		print('No')
	else:
		print('Yes')
		print(1, max(a), min(a))


import sys, collections, math

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	arr = get_array()
	arr.sort()
	if arr[0] != arr[1] and arr[1] != arr[2]:
		print('NO')
	elif arr[0] == arr[1] and arr[1] == arr[2]:
		print('YES')
		print(*arr)
	elif arr[0] == arr[1] and arr[1] != arr[2]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[0], arr[-1])


def do():
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
		return
	if x == y and y > z:
		print('YES')
		print(x, z, z)
		return
	if x == z and z > y:
		print('YES')
		print(y, x, y)
		return
	if z == y and y > x:
		print('YES')
		print(x, x, z)
		return
	print('NO')
q = int(input())
for _ in range(q):
	do()


from collections import Counter
t = int(input())
for i in range(t):
	l = list(map(int, input().strip().split()))
	res = Counter(l)
	if len(res) == 3:
		print('NO')
	elif len(res) == 1:
		print('YES')
		print(str(l[0]) + ' ' + str(l[0]) + ' ' + str(l[0]))
	elif len(res) == 2:
		k = max(res)
		if res[k] == 2:
			print('YES')
			for j in res:
				print(j, end=' ')
			print(1)
		else:
			print('NO')


def read():
	return [int(xx) for xx in input().split()]
(ca,) = read()
for _ in range(ca):
	(x, y, z) = read()
	if 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')


from sys import stdin, stdout

def read_input():
	lines = []
	for line in stdin:
		if 'exit' == line.lower().rstrip():
			break
		lines.append(line.rstrip())
	return lines

def write(s):
	stdout.write(s + '\n')

def finish():
	stdout.flush()
lines = read_input()
t = int(lines[0])
for case in range(1, t + 1):
	(x_n, y_n, z_n) = map(int, lines[case].split())
	x = {'a', 'b'}
	y = {'a', 'c'}
	z = {'b', 'c'}
	a = min([x_n, y_n, z_n])
	(b, c) = (a, a)
	if x_n > y_n:
		x.remove('a')
		b = x_n
	if y_n > x_n:
		y.remove('a')
		c = y_n
	if x_n > z_n:
		x.remove('b')
		a = x_n
	if z_n > x_n:
		z.remove('b')
		c = z_n
	if y_n > z_n:
		y.remove('c')
		a = y_n
	if z_n > y_n:
		z.remove('c')
		b = z_n
	if len(x) == 0 or len(y) == 0 or len(z) == 0:
		write('NO')
	else:
		write('YES')
		write(str(a) + ' ' + str(b) + ' ' + str(c))
finish()


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	ans = []
	maxi = max(l)
	mini = min(l)
	flag = 0
	if len(set(l)) == 3:
		print('NO')
	elif len(set(l)) == 1:
		print('YES')
		print(*l)
	elif l.count(maxi) == 2:
		ans.append(1)
		ans.append(mini)
		ans.append(maxi)
		print('YES')
		print(*ans)
	else:
		print('NO')


for _ in range(int(input())):
	l = sorted([int(u) for u in input().split()])
	if len(set(l)) > 2:
		print('NO')
		continue
	elif len(set(l)) == 1:
		print('YES')
		print(' '.join((str(u) for u in l)))
	elif l[2] == l[1]:
		print('YES')
		print(str(l[0]) + ' ' + str(l[0]) + ' ' + str(l[1]))
	else:
		print('NO')


for _ in range(int(input())):
	data = [int(x) for x in input().split()]
	if len(set(data)) == 3:
		print('NO')
	elif len(set(data)) == 1:
		print('YES')
		print(data[0], data[0], data[0])
	else:
		large = max(data)
		large_count = data.count(large)
		if large_count == 1:
			print('NO')
		else:
			print('YES')
			for q in range(3):
				if large != data[q]:
					pos = q
			ans = [0 for x in range(3)]
			ans[pos] = data[pos]
			ans[(pos + 1) % 3] = data[pos]
			for q in range(3):
				if ans[q] == 0:
					ans[q] = large
			for q in ans:
				print(q, end=' ')
			print()


t = int(input())
while t:
	(x, y, z) = [int(i) for i in input().split()]
	if x != y and z != x and (y != z):
		print('NO')
		t -= 1
		continue
	if x == y == z:
		print('YES')
		print(x, x, x)
		t -= 1
		continue
	maxi = max(x, y, z)
	mini = min(x, y, z)
	count = 0
	for ele in [x, y, z]:
		if ele == maxi:
			count += 1
	if count == 2:
		print('YES')
		print(maxi, mini, mini)
	else:
		print('NO')
	t -= 1


import sys
input = sys.stdin.readline
INF = float('inf')
tc = int(input())
for _ in range(tc):
	(x, y, z) = map(int, input().split())
	if 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')


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	ma = max(a, b, c)
	if a == ma:
		if b == ma:
			print('YES')
			print(ma, c, c)
		elif c == ma:
			print('YES')
			print(b, ma, b)
		else:
			print('NO')
	elif b == ma:
		if a == ma:
			print('YES')
			print(ma, c, c)
		elif c == ma:
			print('YES')
			print(a, a, ma)
		else:
			print('NO')
	elif c == ma:
		if b == ma:
			print('YES')
			print(a, a, ma)
		elif a == ma:
			print('YES')
			print(b, ma, b)
		else:
			print('NO')


t = int(input())
d = {}
for i in range(t):
	d[i] = str(input()).split(' ')
for key in d.keys():
	s = 0
	for i in range(len(d[key]) - 1):
		for j in range(i + 1, len(d[key])):
			if int(d[key][i]) == int(d[key][j]):
				s += 1
	if d[key].count(d[key][0]) == 3:
		print('YES')
		print(d[key][0], d[key][1], d[key][2])
	elif s == 1:
		if int(d[key][0]) == int(d[key][1]) and int(d[key][0]) > int(d[key][2]):
			print('YES')
			print(d[key][0], d[key][2], d[key][2])
		elif int(d[key][0]) > int(d[key][1]) and int(d[key][0]) == int(d[key][2]):
			print('YES')
			print(d[key][1], d[key][0], d[key][1])
		elif int(d[key][0]) < int(d[key][1]) and int(d[key][1]) == int(d[key][2]):
			print('YES')
			print(d[key][0], d[key][0], d[key][1])
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	[x, y, z] = arr
	a = max(x, y)
	b = max(y, z)
	c = max(z, x)
	arr.sort()
	print('YES\n{} {} {}'.format(arr[0], arr[0], arr[1])) if a == b == c else print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for t1 in range(t):
	(x, y, z) = list(map(int, input().split(' ')))
	f = max(x, y)
	f = max(f, z)
	c = 0
	if x == f and y == f:
		print('YES')
		print(x, z, z)
	elif y == f and z == f:
		print('YES')
		print(x, x, z)
	elif x == f and z == f:
		print('YES')
		print(y, x, y)
	else:
		print('NO')


t = int(input())
for i in range(t):
	l = [int(i) for i in input().split()]
	l.sort()
	l1 = [i for i in l]
	l1 = list(set(l1))
	if len(l1) == 1:
		print('YES')
		print(l1[0], l1[0], l1[0])
	elif len(l1) == 3:
		print('NO')
	elif l.count(l[0]) == 2:
		print('NO')
	elif l[0] == 1:
		print('YES')
		print(1, 1, l[1])
	else:
		print('YES')
		print(l[0], l[1], l[0] - 1)


n = int(input())
while n:
	(a, b, c) = sorted(map(int, input().split()))
	if c > b:
		print('NO')
		n -= 1
		continue
	print('YES')
	print(a, a, b)
	n -= 1


def problem1():
	(x, y, z) = sorted(list(map(int, input().split())))
	if y != z:
		print('NO')
		return
	print('YES')
	print(y, x, x)
cases = int(input())
for _ in range(cases):
	problem1()


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if len(set(l)) == 1:
		print('YES')
		print(*l)
	elif len(set(l)) == 2:
		l.sort()
		if l[0] == l[1]:
			print('NO')
		else:
			print('YES')
			print(min(l), min(l), max(l))
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = sorted(map(int, input().split()))
	l = sorted([max(a, b, c), min(a, b, c), min(a, b, c)])
	if max(l[0], l[1]) == a and max(l[2], l[1]) == b and (max(l[0], l[2]) == c):
		print('YES')
		print(*l)
	else:
		print('NO')


def all_same(x, y, z):
	if x == y and y == z and (x == z):
		return 1
	return 0

def analyze(x, y, z):
	if x == y and x > z:
		return 1
	elif x == z and x > y:
		return 1
	elif y == z and x < y:
		return 1
	else:
		return 0
for case in range(int(input())):
	(x, y, z) = map(int, input().split())
	if all_same(x, y, z) == True:
		print('YES')
		print(x, y, z)
	elif analyze(x, y, z) == True:
		print('YES')
		print(max(x, y, z), min(x, y, z), 1)
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(x, y, z) = sorted(map(int, input().split()))
	if x < y < z:
		print('NO')
	elif x < y == z:
		print('YES\n{0} {1} {2}'.format(1, x, y))
	elif x == y < z:
		print('NO')
	else:
		print('YES\n{0} {1} {2}'.format(x, y, z))


t = int(input())
l = []
for i in range(t):
	s = list(map(int, input().split()))
	if s[0] == s[1]:
		if s[0] == s[2]:
			l.append('YES')
			l.append(f'{s[0]} {s[1]} {s[2]}')
		elif s[0] > s[2]:
			l.append('YES')
			l.append(f'{s[0]} 1 {s[2]}')
		else:
			l.append('NO')
	elif s[0] == s[2]:
		if s[0] == s[1]:
			l.append('YES')
			l.append(f'{s[0]} {s[1]} {s[2]}')
		elif s[0] > s[1]:
			l.append('YES')
			l.append(f'{s[0]} {s[1]} 1')
		else:
			l.append('NO')
	elif s[1] == s[2]:
		if s[0] == s[1]:
			l.append('YES')
			l.append(f'{s[0]} {s[1]} {s[2]}')
		elif s[1] > s[0]:
			l.append('YES')
			l.append(f'{s[0]} 1 {s[1]}')
		else:
			l.append('NO')
	else:
		l.append('NO')
for i in l:
	print(i)


for _ in range(int(input())):
	arr = list(map(int, input().split(' ')))
	arr.sort()
	ans = 'NO'
	if arr[0] == arr[1]:
		if arr[0] == arr[2]:
			ans = 'YES'
			a = b = c = arr[2]
	elif arr[1] == arr[2]:
		ans = 'YES'
		a = arr[2]
		b = c = arr[0]
	print(ans)
	if ans == 'YES':
		print(a, ' ', b, ' ', c)


t = int(input())
tests = []
for i in range(t):
	l = input().split()
	xyz = [int(i) for i in l]
	tests.append(xyz)
for t in tests:
	x = t[0]
	y = t[1]
	z = t[2]
	if x == y and y == z and (z == x):
		print('YES')
		print(x, y, z)
	elif x != y and y != z and (z != x):
		print('NO')
	else:
		lisst = [x, y, z]
		high = []
		low = []
		for i in lisst:
			if i == max(lisst):
				high.append(i)
			else:
				low.append(i)
		if len(high) > len(low):
			print('YES')
			print(high[0], low[0], 1)
		else:
			print('NO')


def triplet(A):
	if A[0] == A[1] and A[1] == A[2]:
		print('YES')
		print(A[0], ' ', A[0], ' ', A[0])
		return
	A.sort()
	if A[-1] == A[-2]:
		print('YES')
		print(A[-1], ' ', A[0], ' ', A[0])
	else:
		print('NO')
	return
t = int(input())
for i in range(t):
	A = [int(i) for i in input().split()][:3]
	triplet(A)


test = int(input())
for t in range(test):
	lst1 = list(map(int, input().split()))
	lst1.sort()
	if lst1[1] == lst1[2]:
		print('YES')
		print(lst1[0], lst1[0], lst1[1])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and x == z:
		print('yes')
		print(x, y, z)
	elif x == y and x > z:
		print('yes')
		print(z, z, y)
	elif x == z and x >= y:
		print('yes')
		c = y
		if c != 1:
			c = y - 1
		print(x, y, c)
	elif y == z and z >= x:
		print('yes')
		print(x, x, z)
	else:
		print('no')


def solve():
	(x, y, z) = map(int, input().split())
	b = max(x, y, z)
	cnt = 0
	if x == b:
		cnt += 1
	if y == b:
		cnt += 1
	if z == b:
		cnt += 1
	if cnt == 1:
		print('NO')
		return
	print('YES')
	print(min(x, y, z), min(x, y, z), b)
t = int(input())
for i in range(t):
	solve()


def solve():
	(x, y, z) = list(map(int, input().split()))
	(a, b, c) = [0, 0, 0]
	flag = False
	if x == y:
		if z <= x:
			flag = True
			a = x
			b = c = z
	elif x == z:
		if y <= x:
			flag = True
			b = x
			a = c = y
	elif y == z:
		if x <= y:
			flag = True
			c = y
			a = b = x
	if flag:
		print('YES')
		print(a, b, c)
	else:
		print('NO')
ct = int(input())
while ct > 0:
	solve()
	ct -= 1


tes = int(input())
for _ in range(tes):
	(x, y, z) = map(int, input().split())
	if x == z:
		if x >= y:
			print('YES')
			print(max(x, y, z), min(x, y, z), 1)
		else:
			print('NO')
	elif x == y:
		if z > y:
			print('NO')
		else:
			print('YES')
			print(max(x, y, z), min(x, y, z), 1)
	elif y == z:
		if y < x:
			print('NO')
		else:
			print('YES')
			print(max(x, y, z), min(x, y, z), 1)
	else:
		print('NO')


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	(x, y, z) = map(int, input().split())
	mx = max(x, y, z)
	cou = 0
	for i in [x, y, z]:
		if mx == i:
			cou += 1
		else:
			mx2 = i
	if cou == 2:
		print('YES')
		print(mx, mx2, mx2)
	elif cou == 3:
		print('YES')
		print(mx, mx, mx)
	else:
		print('NO')
	t -= 1


n = int(input())
arr = []
for i in range(n):
	(x, y, z) = map(int, input().split())
	a = [x, y, z]
	a.sort()
	if a[1] != a[2]:
		arr.append('NO')
	else:
		arr.append(['YES', a[2], a[0], a[0]])
for i in range(len(arr)):
	if arr[i][0] == 'YES':
		print(arr[i][0])
		print(arr[i][1], ' ', arr[i][2], ' ', arr[i][3])
	else:
		print(arr[i])


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	c = [x, y, z].count(m)
	if c >= 2:
		if c == 2:
			if x == z == m:
				print('YES')
				print(x, y, 1)
			elif z == y == m:
				print('YES')
				print(x, 1, z)
			else:
				print('YES')
				print(1, y, z)
		else:
			print('YES')
			print(x, y, z)
	else:
		print('NO')


test_case = int(input())
for i in range(test_case):
	values = list(map(int, input().split(' ')))
	if values[0] == values[1] == values[2]:
		print('YES')
		print(values[0], values[1], values[2])
	elif values[0] == values[2]:
		a = values[0]
		b = values[1]
		c = b
		if max(a, b) == values[0] and max(b, c) == values[1] and (max(c, a) == values[2]):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
	elif values[0] == values[1]:
		c = values[2]
		b = values[0]
		a = c
		if max(a, b) == values[0] and max(b, c) == values[1] and (max(c, a) == values[2]):
			print('YES')
			print(str(a) + ' ' + str(b) + ' ' + str(c))
		else:
			print('NO')
	else:
		c = values[1]
		a = values[0]
		b = a
		if max(a, b) == values[0] and max(b, c) == values[1] and (max(c, a) == values[2]):
			print('YES')
			print(str(a) + ' ' + str(b) + ' ' + str(c))
		else:
			print('NO')


t = int(input())
tests = []
for i in range(t):
	tests += [[int(n) for n in input().strip().split()]]
for test in tests:
	test.sort()
	if test[0] == test[1] and test[1] < test[2]:
		print('NO')
	elif test[0] != test[1] and test[1] != test[2] and (test[0] != test[2]):
		print('NO')
	elif test[0] == test[1] and test[1] == test[2]:
		print('YES')
		print(test[0], test[1], test[2])
	else:
		print('YES')
		a = max(test)
		if min(test) == 1:
			b = 1
		else:
			b = min(test) - 1
		c = min(test)
		print(a, b, c)


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


def f(x, y, z):
	x_y_z = [x, y, z]
	x_y_z.sort()
	if x_y_z[0] == x_y_z[1] == x_y_z[2]:
		result = x_y_z
	elif x_y_z[0] != x_y_z[1] == x_y_z[2]:
		result = [x_y_z[0], x_y_z[0], x_y_z[1]]
	elif x_y_z[0] == x_y_z[1] != x_y_z[2]:
		result = None
	elif x_y_z[0] != x_y_z[1] != x_y_z[2]:
		result = None
	return 'NO' if result is None else f'YES\n{result[0]} {result[1]} {result[2]}'
for _ in range(int(input())):
	print(f(*tuple(map(int, input().split()))))


for _ in range(int(input())):
	a = list(map(int, input().split()))
	if a[0] == a[1] == a[2]:
		print('YES')
		print(a[0], a[1], a[2])
	elif a[0] != a[1] and a[1] != a[2] and (a[0] != a[2]):
		print('NO')
	else:
		a.sort()
		x = a.count(a[2])
		if x == 1:
			if a[1] == a[0]:
				print('No')
		if x == 2:
			print('YES')
			print(a[2], a[0], a[0])


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return list(map(int, input().split()))

def solve(a, b, c):
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		print('YES')
		print(' '.join(map(str, [a, b, c])))
		return True
	return False
t = inp()
for i in range(t):
	xyz = inlt()
	x = xyz[0]
	y = xyz[1]
	z = xyz[2]
	if solve(x, x, y):
		pass
	elif solve(x, x, z):
		pass
	elif solve(x, z, y):
		pass
	elif solve(x, z, z):
		pass
	elif solve(y, x, y):
		pass
	elif solve(y, x, z):
		pass
	elif solve(y, z, y):
		pass
	elif solve(y, z, z):
		pass
	else:
		print('NO')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	k = max(l)
	c = l.count(k)
	if c == 2:
		print('YES')
		print(min(l), min(l), k)
	elif c == 3:
		print('YES')
		print(k, k, k)
	else:
		print('NO')


def ans(x, y, z):
	k1 = max(x, y, z)
	k2 = min(x, y, z)
	if k1 == k2:
		print('YES')
		print(k1, k1, k1)
		return
	if [x, y, z].count(k1) == 2 and [x, y, z].count(k2) == 1:
		if x == k1 and y == k2 and (z == k1):
			print('YES')
			print(k1, k2, k2)
		elif x == k2 and y == k1 and (z == k1):
			print('YES')
			print(k2, k2, k1)
		elif x == k1 and y == k1 and (z == k2):
			print('YES')
			print(k2, k1, k2)
		else:
			print('NO')
		return
	else:
		print('NO')
		return
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	ans(x, y, z)


t = int(input())
for i in range(t):
	string = list(input().split(' '))
	x = int(string[0])
	y = int(string[1])
	z = int(string[2])
	a = [x, y, z]
	a.sort()
	ans = ''
	if a[2] == a[1]:
		ans = ans + str(a[2]) + ' ' + str(a[0]) + ' ' + str(a[0])
		print('YES')
		print(ans)
	else:
		print('NO')


for _ in range(int(input())):
	li = [int(i) for i in input().split()]
	if len(set(li)) == 3 or li.count(min(li)) == 2:
		print('NO')
	else:
		print('YES')
		print(min(li), min(li), max(li))


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	flag = 1
	mx = max(x, y, z)
	lis = [x, y, z]
	mx_count = 0
	mn = min(x, y, z)
	last = mn - 1
	for j in lis:
		if j == mx:
			mx_count += 1
	if mx_count < 2:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	(a, b, c) = (-1, -1, -1)
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if x == y:
		if z > x:
			print('NO')
		else:
			print('YES')
			print(1, y, z)
	elif z == y:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(x, 1, z)
	elif x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(1, y, z)
	else:
		print('NO')


import random
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if max(x, y) == max(y, z) == max(z, x):
		a = max(x, y)
		b = sorted(list(set([x, y, z])))[0]
		c = random.randint(1, min(x, y, z))
		print('Yes')
		print(a, b, c)
	else:
		print('No')


T = int(input())
for t in range(1, T + 1):
	string = input().split()
	x = int(string[0])
	y = int(string[1])
	z = int(string[2])
	lst = []
	lst.append(x)
	lst.append(y)
	lst.append(z)
	lst.sort()
	if lst[1] != lst[2]:
		print('NO')
		continue
	a = lst[2]
	b = lst[0]
	c = b
	print('YES')
	print(a, b, c)


t = int(input())
for i in range(t):
	[x, y, z] = [int(s) for s in input().split(' ')]
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y:
		if z > x:
			print('NO')
		else:
			print('YES')
			a = x
			b = z
			c = min(y, z)
			print(' '.join([str(x) for x in [a, b, c]]))
	elif x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			a = y
			b = x
			c = min(y, z)
			print(' '.join([str(x) for x in [a, b, c]]))
	elif y == z:
		if x > y:
			print('NO')
		else:
			print('YES')
			a = z
			b = x
			c = min(x, y)
			print(' '.join([str(x) for x in [a, b, c]]))


y = int(input())
for i in range(y):
	al = input().split()
	m = list(map(int, al))
	m.sort()
	s = set(m)
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(m[0], m[1], m[2])
	else:
		z = x = 0
		for j in s:
			e = m.count(j)
			if e == 1:
				z = j
			elif e == 2:
				x = j
		if z > x:
			print('NO')
		else:
			print('YES')
			print(m[0], m[0], m[1])


arr = list()
for _ in range(int(input())):
	arr.append(list(map(int, input().split())))
for (x, y, z) in arr:
	st = 1
	sm = 0
	if x == y:
		a = x
		c = 1
		b = z
		st = z
		sm = x
	if y == z:
		b = z
		c = 1
		a = x
		st = x
		sm = y
	if x == z:
		c = z
		a = 1
		b = y
		st = y
		sm = z
	if x == y == z:
		a = b = c = z
	if st <= sm:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


def magic(x, y, z):
	s = set()
	s.add(x)
	s.add(y)
	s.add(z)
	c = 0
	m = max(x, y, z)
	if x == m:
		c = c + 1
	if y == m:
		c = c + 1
	if z == m:
		c = c + 1
	if len(s) == 3:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(x, y, z)
	elif c == 1:
		print('NO')
	else:
		print('YES')
		for i in s:
			if i != m:
				c = i
				break
		print(c, c, m)
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	magic(x, y, z)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x != y and x != z and (y != z):
		print('NO')
	else:
		q = [x, y, z]
		q.sort()
		if q[0] == q[1]:
			print('NO')
		else:
			print('YES')
			print(q[0], q[0], q[-1])


cases = int(input())
for i in range(cases):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	equal = 0
	small = 0
	for p in [x, y, z]:
		if p == m:
			equal += 1
		if p < m:
			small += 1
			s = p
	if equal == 2 and small == 1:
		print('YES')
		print(m, s, 1)
	elif equal == 3:
		print('YES')
		print(m, m, m)
	else:
		print('NO')


t = int(input())
valid = 0
for i in range(t):
	valid = 0
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	a = y
	b = x
	c = z
	if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
		print('YES')
		print(a, b, c)
		valid = 1
		continue
	else:
		if a > x:
			a = x
		if a > y:
			a = y
		if b > x:
			b = x
		if b > z:
			b = z
		if c > y:
			c = y
		if c > z:
			c = z
		if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
			print('YES')
			print(a, b, c)
			valid = 1
			continue
	if valid == 0:
		print('NO')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	a = li()
	a.sort()
	if a[-1] == a[-2]:
		print('YES')
		print(a[-1], a[-3], a[-3])
	else:
		print('NO')
for _ in range(I()):
	solve()


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

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

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	(x, y, z) = MAP()
	if x == y or y == z or z == x:
		s1 = 0
		if x == y:
			s1 = x
		else:
			s1 = z
		s2 = 1
		if s1 == x and x == y:
			s2 = z
		elif s1 == y and y == z:
			s2 = x
		else:
			s2 = y
		if s1 == x and s1 == y and (s1 > z) or (s1 == y and y == z and (s1 > x)) | (s1 == z and s1 == x and (s1 > y)):
			print('YES')
			print(s1, 1, s2)
		elif s1 == s2:
			print('YES')
			print(s1, 1, s1)
		else:
			print('NO')
	else:
		print('NO')


import time
from collections import deque

def inpt():
	return int(input())

def inpl():
	return list(map(int, input().split()))

def inpm():
	return map(int, input().split())

def solve():
	(x, y, z) = inpm()
	[x, y, z] = sorted([x, y, z])
	if x == y != z or (x != y and y != z and (z != x)):
		print('NO')
		return
	elif x == y == z:
		print('YES')
		print(x, y, z)
		return
	elif x != y and y == z:
		print('YES')
		if x > 1:
			print(x - 1, x, y)
		elif x == 1:
			print(1, 1, y)

def main():
	m = 10 ** 9 + 7
	t = int(input())
	while t:
		t -= 1
		solve()
main()


t = int(input())

def pm(ls):
	a = None
	b = None
	c = None
	l = ls.copy()
	l.sort()
	if l[1] == l[2] and l[0] <= l[2]:
		ans = None
		m = ls.index(l[0])
		if m == 0:
			ans = [l[0], l[0], l[1]]
		elif m == 1:
			ans = [l[0], l[1], l[0]]
		else:
			ans = [l[1], l[0], l[0]]
		print('YES')
		print(ans[0], ans[1], ans[2])
	else:
		print('NO')
for _ in range(t):
	l = list(map(int, input().split()))
	pm(l)


for i in range(int(input())):
	a = list(map(int, input().split()))
	if a[0] == a[1] == a[2]:
		(print('YES'), print((str(a[0]) + ' ') * 3))
	elif a[0] == a[1] and a[0] != a[2] and (a[0] >= a[2]):
		(print('YES'), print(a[0], a[2], '1'))
	elif a[0] != a[1] and (a[2] == a[1] and a[2] > a[0] or (a[2] == a[0] and a[2] > a[1])):
		(print('YES'), print(a[0], a[1], '1'))
	else:
		print('NO')


import math
import os
import random
import re
import sys
from collections import Counter
import heapq
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == y and y > z:
		print('YES')
		print(x, z, z)
	elif z == x and y < x:
		print('YES')
		print(y, z, y)
	elif z == y and z > x:
		print('YES')
		print(x, x, y)
	else:
		print('NO')


from sys import stdin
from math import ceil, gcd

def func():
	return
for _ in range(int(stdin.readline())):
	arr = list(map(int, stdin.readline().split()))
	if arr.count(max(arr)) >= 2:
		print('YES')
		if arr.count(max(arr)) == 3:
			print(arr[0], arr[1], arr[2])
		else:
			print(max(arr), min(arr), min(arr))
	else:
		print('NO')


def multiple_input():
	return map(int, input().split())

def list_input():
	return list(map(int, input().split()))
for _ in range(int(input())):
	a = list_input()
	a.sort()
	if a[2] == a[1]:
		print('YES')
		print(a[1], a[0], a[0])
	else:
		print('NO')


t = int(input())
while t:
	t = t - 1
	(x, y, z) = map(int, input().split())
	l = list([x, y, z])
	l.sort(reverse=True)
	cnt = 0
	if l[0] > l[1] and l[0] > l[2]:
		cnt = 2
	a = l[0]
	b = l[2]
	c = l[2]
	if c <= 0 or cnt == 2:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


n = int(input())
for i in range(n):
	(x, y, z) = [int(j) for j in input().split(' ')]
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and z > y:
		print('NO')
	elif z == y and z < x:
		print('NO')
	elif x == z and y > z:
		print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(min([x, y, z]), min([x, y, z]), max([x, y, z])))


def main():
	for __ in [0] * int(input()):
		(*X,) = map(int, input().split())
		X.sort()
		(x, y, z) = X
		if x == y == z:
			print('YES')
			print(x, y, z)
		elif y == z:
			print('YES')
			print(x, x, y)
		else:
			print('NO')
main()


from collections import Counter
for _ in range(int(input())):
	a = Counter(list(map(int, input().split())))
	if len(a) == 3:
		print('No')
	elif len(a) == 1:
		print('Yes')
		i = list(a.keys())[0]
		print(i, i, i)
	else:
		k = list(a.keys())
		k.sort()
		if a[k[-1]] == 2:
			print('Yes')
			print(k[-1], k[-2], 1)
		else:
			print('No')


def mainf(x, y, z):
	if x > z and x == y:
		return 1
	else:
		return 0
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x != y and y != z and (x != z):
		print('NO')
	elif mainf(x, y, z):
		print('YES')
		print(1, x, z)
	elif mainf(x, z, y):
		print('YES')
		print(x, y, 1)
	elif mainf(y, z, x):
		print('YES')
		print(x, 1, y)
	else:
		print('NO')


t = int(input())
while t:
	(x, y, z) = input().split()
	lst = []
	lst.append(int(x))
	lst.append(int(y))
	lst.append(int(z))
	lst.sort(reverse=True)
	if lst[0] != lst[1]:
		print('NO')
	else:
		print('YES')
		print(lst[0], lst[2], lst[2])
	t -= 1


answer = []
for i in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	u = [x, y, z]
	m = max(x, y, z)
	m1 = min(u)
	if u.count(m) == 1:
		print('NO')
	else:
		print('YES')
		print(m, m1, m1)


def yes(a, b, c):
	print('YES')
	print(a, b, c)

def no():
	print('NO')
for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		yes(x, x, x)
	elif x == y or y == z or x == z:
		if x == y:
			(a, b) = (x, z)
		if x == z:
			(a, b) = (x, y)
		if y == z:
			(a, b) = (y, x)
		if b > a:
			no()
		else:
			if b == 1:
				c = 1
			else:
				c = b - 1
			yes(a, b, c)
	else:
		no()


t = int(input())
for kz in range(t):
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]
	z = l[2]
	f = 0
	if x == z and y <= x or (x == y and z <= x) or (z == y and x <= z):
		print('YES')
		if x == z and y <= x:
			print('{} {} {}'.format(x, y, y))
			f = 1
		if x == y and z <= x and (f == 0):
			print('{} {} {}'.format(x, z, z))
		if z == y and x <= z and (f == 0):
			print('{} {} {}'.format(z, x, x))
	else:
		print('NO')


for d in range(int(input())):
	(x, y, z) = map(int, input().split())
	v = max(x, y, z)
	if x == v:
		l = max(y, z)
		if v != l:
			print('NO')
		else:
			print('YES')
			print(x, min(y, z), min(y, z))
	elif y == v:
		l = max(x, z)
		if v != l:
			print('NO')
		else:
			print('YES')
			print(y, min(x, z), min(x, z))
	else:
		l = max(y, x)
		if v != l:
			print('NO')
		else:
			print('YES')
			print(min(x, y), min(x, y), z)


xyzl = [list(map(int, input().split())) for _ in range(int(input()))]
for xyz in xyzl:
	(x, y, z) = xyz
	m = max(xyz)
	abc = [min(xyz)] * 3
	i = xyz.index(m)
	if m not in xyz[i + 1:]:
		print('NO')
		continue
	print('YES')
	j = i + 1 + xyz[i + 1:].index(m)
	abc[i + j - 1] = m
	print(*abc)


t = int(input())
for _ in range(t):
	l = list(map(int, input().rstrip().split()))
	x = l[0]
	y = l[1]
	z = l[2]
	a = [x, y]
	b = [x, z]
	c = [y, z]
	flag = 0
	for a1 in a:
		for b1 in b:
			for c1 in c:
				if x == max(a1, b1) and y == max(a1, c1) and (z == max(b1, c1)):
					flag = 1
					ans = [a1, b1, c1]
					break
	if flag == 0:
		print('NO')
	else:
		print('YES')
		print('{} '.format(ans[0]), end='')
		print('{} '.format(ans[1]), end='')
		print('{}'.format(ans[2]))


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j

def fac(n):
	c = 1
	i = 1
	while i <= n:
		c *= i
		i += 1
	return c

def check_happy(n):
	ss = set()
	print(n)
	while n != 1:
		val = n
		s = 0
		print(val)
		while val != 0:
			s += (val % 10) ** 2
			val = val // 10
		print(val)
		print('hi')
		if val in ss:
			return False
		else:
			n = val
			ss.add(n)
	return True

def update(a, b):
	c = 1
	val = a
	while a < b:
		print(c, a)
		c += c
		a += a
	print(1)
	while a > b:
		print()
		a -= val
		c -= 1
	return c
import random as rand

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
from itertools import permutations
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split(' '))
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y and y != z:
		if z > x:
			print('NO')
		else:
			print('YES')
			print(x, z, z)
	elif x == z and y != z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(x, y, y)
	elif z == y and y != x:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(x, x, z)
	else:
		print('NO')


t = int(input())
i = 0
while i < t:
	(m, n, p) = map(int, input().split())
	j = 0
	if m == max(m, n, p):
		j += 1
	if n == max(m, n, p):
		j += 1
	if p == max(m, n, p):
		j += 1
	if j >= 2:
		print('YES')
		print(max(m, n, p), min(m, n, p), 1)
	if j < 2:
		print('NO')
	i += 1


import sys
sys.setrecursionlimit(100000)
from collections import defaultdict
from collections import deque
import heapq
I = lambda : list(map(int, input().split(' ')))
for _ in range(int(input())):
	(x, y, z) = I()
	if x == y == z:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	elif x == y and x > z:
		print('YES')
		print(str(x) + ' ' + str(z) + ' ' + str(z))
	elif x == z and x > y:
		print('YES')
		print(str(y) + ' ' + str(x) + ' ' + str(y))
	elif y == z and y > x:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(y))
	else:
		print('NO')


for _ in range(int(input())):
	X = sorted(list(map(int, input().split())))
	print('YES\n' + str(X[-1]) + ' ' + str(X[0]) + ' ' + str(X[0]) if X.count(max(X)) >= 2 else 'NO')


t = int(input())
for _ in range(t):
	(a, b, c) = list(map(int, input().split()))
	x = max(a, b)
	y = max(a, c)
	z = max(b, c)
	temp = [x, y, z]
	temp1 = [a, b, c]
	if temp.count(max(temp)) == len(temp):
		print('YES')
		print(max(temp1), min(temp1), min(temp1))
	else:
		print('NO')


for _ in range(int(input())):
	l = list(map(int, input().strip().split(' ')))
	l.sort(reverse=True)
	s = set(l)
	if len(s) == 3:
		print('NO')
	elif len(s) == 2:
		if l[0] == l[1]:
			print('YES')
			print(l[0], l[2], l[2])
		else:
			print('NO')
	else:
		print('YES')
		print(*l)


def func(n):
	for i in range(n):
		l = list(map(int, input().split()))
		l.sort()
		if l[0] <= l[1] and l[1] == l[2]:
			print('YES')
			print(l[0], l[0], l[1])
		else:
			print('NO')
n = int(input())
func(n)


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
for _ in range(inp()):
	x = inpl()
	x.sort(reverse=True)
	if x[0] == x[2] or (x[0] == x[1] and x[1] != x[2]):
		print('YES')
		print(x[0], x[2], 1)
	else:
		print('NO')


no_of_test_cases = int(input())
for test_case in range(no_of_test_cases):
	a = sorted(list([int(i) for i in input().split(' ')]))
	if a[2] == a[1]:
		print('YES')
		print(str(a[2]) + ' ' + str(a[0]) + ' ' + str(a[0]))
	else:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split(' '))
	num = []
	num.append(x)
	num.append(y)
	num.append(z)
	maxi = max(num)
	mini = min(num)
	k = num.count(maxi)
	h = num.count(mini)
	if x == y == z:
		print('Yes')
		print(x, y, z)
	elif k > h:
		print('Yes')
		print(maxi, mini, 1)
	else:
		print('No')
	t -= 1


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	s = max(x, y, z)
	(a, b, c) = (-1, -1, -1)
	if x == y == s:
		(a, b, c) = (x, z, z)
	elif y == z == s:
		(a, b, c) = (x, x, z)
	elif z == x == s:
		(a, b, c) = (y, x, y)
	print('YES' if not a == -1 else 'NO')
	if not a == -1:
		print(a, b, c)


tst = int(input())
t = 1
while t <= tst:
	x = list(map(int, input().split()))
	a = x[0]
	b = x[1]
	c = x[2]
	x.sort()
	m = x[2]
	cnt = 0
	if a == m:
		cnt += 1
	if b == m:
		cnt += 1
	if c == m:
		cnt += 1
	if cnt >= 2:
		print('YES')
		print(m, x[0], x[0])
	else:
		print('NO')
	t += 1


num = int(input())
for i in range(num):
	quest = input().split()
	numbers = [int(i) for i in quest]
	if numbers[0] > numbers[1] and numbers[0] > numbers[2] or (numbers[1] > numbers[0] and numbers[1] > numbers[2]) or (numbers[2] > numbers[0] and numbers[2] > numbers[1]):
		print('NO')
		continue
	else:
		print('YES')
		if numbers[0] == numbers[1] and numbers[1] == numbers[2]:
			print(numbers[0], numbers[0], numbers[0])
		elif numbers[0] == numbers[1]:
			print(numbers[0], numbers[2], numbers[2])
		elif numbers[1] == numbers[2]:
			print(numbers[0], numbers[0], numbers[2])
		else:
			print(numbers[0], numbers[1], numbers[1])


n = int(input())
for _ in range(n):
	(x, y, z) = list(map(int, input().split()))
	t = max(x, y, z)
	p = min(x, y, z)
	a = [x, y, z]
	if a.count(t) == 1:
		print('NO')
	elif a.count(t) == 2:
		print('YES')
		print(p, p, t)
	elif a.count(t) == 3:
		print('YES')
		print(t, t, t)


try:
	for _ in range(int(input())):
		m = list(map(int, input().split()))
		l = []
		if m[0] == m[1] and m[1] == m[2]:
			l = [m[0]] * 3
			print('YES')
			print(*l)
		elif m[0] != m[1] and m[1] != m[2] and (m[0] != m[2]):
			print('NO')
		elif m.count(max(m)) != 2:
			print('NO')
		else:
			print('YES')
			print(min(m), end=' ')
			print(min(m), end=' ')
			print(max(m))
except:
	pass


for _ in range(int(input())):
	li1 = list(map(int, input().split()))
	li = sorted(li1)
	if li[1] == li[2] and li[0] <= li[1]:
		print('YES')
		print(str(li[1]) + ' ' + str(li[0]) + ' ' + str(li[0]))
	else:
		print('NO')


import sys
import math
from collections import defaultdict

def solve(test):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	else:
		mx = max(x, y, z)
		mn = min(x, y, z)
		a = [x, y, z]
		(cntmx, cntmn) = (0, 0)
		for e in a:
			if e == mx:
				cntmx += 1
			elif e == mn:
				cntmn += 1
		if cntmx == 3:
			print('YES')
			print(x, y, z)
		elif cntmn == 2 and cntmx == 1:
			print('NO')
		elif cntmn == 1 and cntmx == 2:
			print('YES')
			if mx == x and mx == y:
				print(mx, mn, mn)
			elif mx == x and mx == z:
				print(mn, mx, mn)
			elif mx == y and mx == z:
				print(mn, mn, mx)
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


for s in [*open(0)][1:]:
	(x, y, z) = sorted(map(int, s.split()))
	if y != z:
		print('NO')
	else:
		print(f'YES\n{x} {x} {z}')


def main():
	for _ in range(int(input())):
		l = sorted(list(map(int, input().split())), reverse=True)
		if l[0] != l[1]:
			print('NO')
		else:
			print('YES')
			print(l[0], l[2], l[2])
main()


import itertools

def fast(x, y, z):
	for (a, b, c) in itertools.product([x, y, z], repeat=3):
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			return (a, b, c)
	return None

def main():
	t = int(input())
	for _ in range(t):
		(x, y, z) = [int(x) for x in input().split()]
		result = fast(x, y, z)
		if result:
			print('YES')
			print(' '.join((str(x) for x in result)))
		else:
			print('NO')
main()


def ok(x, y, z, a):
	(x1, y1, z1) = (max(a[0], a[1]), max(a[0], a[2]), max(a[1], a[2]))
	if x == x1 and y == y1 and (z == z1):
		return True
	else:
		return False
tests = int(input())
for test in range(tests):
	(x, y, z) = map(int, input().split())
	f = False
	a1 = [x, y, z]
	a2 = [x, z, y]
	a3 = [y, x, z]
	a4 = [y, z, x]
	a5 = [z, x, y]
	a6 = [z, y, x]
	b = [[x, x, x], [x, x, y], [x, x, z], [x, y, x], [x, y, y], [x, y, z], [x, z, x], [x, z, y], [x, z, z], [y, x, x], [y, x, y], [y, x, z], [y, y, x], [y, y, y], [y, y, z], [y, z, x], [y, z, y], [y, z, z], [z, x, x], [z, x, y], [z, x, z], [z, y, x], [z, y, y], [z, y, z], [z, z, x], [z, z, y], [z, z, z]]
	for i in b:
		if ok(x, y, z, i):
			print('YES')
			print(i[0], i[1], i[2])
			f = True
			break
	if not f:
		print('NO')


def process():
	(x, y, z) = list(map(int, input().split()))
	if x == y == z:
		print('Yes')
		print(x, y, z)
	elif x != y and z != y and (x != z):
		print('No')
	elif x == y and z > y or (z == y and x > y) or (x == z and y > x):
		print('No')
	else:
		print('Yes')
		print(max(x, y, z), min(x, y, z), 1)

def main():
	tc = int(input())
	for x in range(tc):
		process()
main()


testCases = int(input())
while testCases:
	lst = sorted(list(map(int, input().split())))
	if lst[1] != lst[2]:
		print('NO')
	else:
		print('YES')
		print(lst[0], lst[0], lst[2])
	testCases -= 1


for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	a.sort()
	if a[1] != a[2]:
		print('NO')
		continue
	print('YES')
	print(f'1 {a[0]} {a[1]}')


def solution(x, y, z):
	list = sorted([x, y, z])
	if x == y and z <= x or (y == z and x <= y) or (x == z and y <= x):
		return (True, list[2], list[0], list[0])
	else:
		return (False, 0, 0, 0)
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	(istrue, a, b, c) = solution(x, y, z)
	if istrue:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


import itertools

def check_validity(x, y, z, possibles):
	for pos in possibles:
		if x == max(pos[0], pos[1]) and y == max(pos[0], pos[2]) and (z == max(pos[1], pos[2])):
			return '\n'.join(['YES', ' '.join(map(str, pos))])
	return 'NO'
t = int(input())
res = []
for i in range(t):
	(x, y, z) = map(int, input().split(' '))
	possibles = itertools.product([x, y, z], repeat=3)
	res += [check_validity(x, y, z, possibles)]
print(*res, sep='\n')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	d = max(x, y, z)
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y == z:
		print('YES')
		print(x, y, z)
	elif [x, y, z].count(d) == 1:
		print('NO')
	else:
		print('YES')
		f = [i for i in [x, y, z] if i != d]
		print(d, f[0], 1)


t = int(input())
ans = []
for i in range(t):
	x = []
	x = [int(i) for i in input().split()]
	if x.count(max(x)) < 2:
		ans.append('NO')
	else:
		ans.append('YES')
		ans.append((min(x), min(x), max(x)))
for i in ans:
	if type(i) != str:
		print(*i)
	else:
		print(i)


def solve(x, y, z):
	arr = [x, y, z]
	out = []
	if len(set(arr)) == 3:
		return 'NO'
	elif len(set(arr)) == 2:
		if arr.count(max(arr)) == 1:
			return 'NO'
		else:
			print('YES')
			out = [max(arr), min(arr), min(arr)]
			out = map(str, out)
			return ' '.join(out)
	else:
		print('YES')
		out = [max(arr), max(arr), max(arr)]
		out = map(str, out)
		return ' '.join(out)
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	print(solve(x, y, z))


from collections import Counter
(t, *f) = map(int, open(0).read().split())
xyz = [f[i * 3:i * 3 + 3] for i in range(t)]
for x in xyz:
	cx = Counter(x)
	if len(cx) == 3:
		print('NO')
	elif len(cx) == 1:
		print('YES')
		print(*x)
	else:
		(a, b) = (max(cx.keys()), min(cx.keys()))
		if cx[a] < cx[b]:
			print('NO')
		else:
			print('YES')
			if x.index(b) == 0:
				print(b, b, a)
			elif x.index(b) == 1:
				print(b, a, b)
			else:
				print(a, b, b)


for _ in range(int(input())):
	flag = 0
	a1 = [int(x) for x in input().split()]
	if len(set(a1)) == 1:
		print('YES')
		flag = 1
		for i in a1:
			print(i, end=' ')
	elif len(set(a1)) == 3:
		print('NO')
		flag = 1
	else:
		x = a1[0]
		y = a1[1]
		z = a1[2]
		if x == y:
			(a, b, c) = (1, y, z)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
			(a, b, c) = (x, 1, z)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
		elif y == z:
			(a, b, c) = (x, 1, z)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
			(a, b, c) = (x, y, 1)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
		else:
			(a, b, c) = (1, y, z)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
			(a, b, c) = (x, y, 1)
			if x == max(a, b) and y == max(b, c) and (z == max(a, c)):
				print('YES')
				flag = 1
				print(a, b, c)
		if flag == 0:
			print('NO')


for i in range(int(input())):
	lis = [int(x) for x in input().split()]
	if lis[0] == lis[2] == lis[1]:
		print('YES')
		print(*lis)
		continue
	if lis.count(max(lis)) == 1:
		print('NO')
		continue
	if len(set(lis)) == 3:
		print('NO')
		continue
	else:
		print('YES')
		print(*set(lis), min(lis))


t = int(input())

def test(my_list):
	return x == max(my_list[0], my_list[1]) and y == max(my_list[0], my_list[2]) and (z == max(my_list[1], my_list[2]))
for j in range(t):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	array = [(x, x, y), (x, x, z), (x, z, y), (x, z, z), (y, x, y), (y, x, z), (y, z, y), (y, z, z)]
	is_ver = False
	i = 0
	while i < 8 and is_ver == False:
		is_ver = test(array[i])
		i += 1
	if is_ver:
		print('YES')
		print(array[i - 1][0], array[i - 1][1], array[i - 1][2])
	else:
		print('NO')


test = int(input())
for j in range(test):
	(a, b, c) = map(int, input().split())
	y = a + b + c
	s = set()
	s.add(a)
	s.add(b)
	s.add(c)
	if len(s) > 2:
		print('NO')
	elif len(s) == 1:
		print('YES')
		print(a, a, a)
	else:
		x = 2 * max(s) + min(s)
		if x == y:
			print('YES')
			print('1', min(s), max(s))
		else:
			print('NO')


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	k = sorted([x, y, z])
	if k[1] != k[2]:
		print('NO')
	else:
		print('YES')
		print(k[1], k[0], 1)


for _ in ' ' * int(input()):
	(a, b, c) = map(int, input().split())
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a != b and b != c and (c != a):
		print('NO')
	elif a == b:
		if c > a:
			print('NO')
		else:
			print('YES')
			print(1, c, a)
	elif b == c:
		if a > b:
			print('NO')
		else:
			print('YES')
			print(1, a, b)
	elif a == c:
		if b > a:
			print('NO')
		else:
			print('YES')
			print(1, b, a)


for _ in range(int(input())):
	se = set()
	(x, y, z) = map(int, input().split())
	se.add(x)
	se.add(y)
	se.add(z)
	if len(se) == 3:
		print('NO')
		continue
	if len(se) == 1:
		print('YES')
		print(x, end=' ')
		print(x, end=' ')
		print(x)
	elif x > y and x > z or (y > x and y > z) or (z > x and z > y):
		print('NO')
	else:
		print('YES')
		if x == y:
			print(z, end=' ')
			print(x, end=' ')
			print(z)
		elif y == z:
			print(x, end=' ')
			print(x, end=' ')
			print(z)
		else:
			print(x, end=' ')
			print(y, end=' ')
			print(y)


for item in range(int(input())):
	fin = sorted(list(map(int, input().split())))
	x = fin[0]
	y = fin[1]
	z = fin[2]
	if z == max(x, y):
		print('YES')
		print(1, x, y)
	else:
		print('NO')


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
MOD = 998244353
T = int(stdin.readline())
for _ in range(T):
	a = list(map(int, stdin.readline().split()))
	a.sort()
	mx = a[2]
	cm = 0
	for i in range(3):
		if a[i] == mx:
			cm += 1
	if cm == 1:
		print('NO')
		continue
	print('YES')
	print(a[0], a[0], a[1])


b = int(input())
for k in range(b):
	(x, y, z) = list(map(int, input().split()))
	if x != y and x != z and (y != z):
		print('NO')
	elif x > y and y == z or (y > x and x == z) or (z > x and x == y):
		print('NO')
	else:
		print('YES')
		if x == y:
			print(x, z, z)
		elif y == z:
			print(x, x, z)
		else:
			print(y, x, y)


from collections import Counter
N = int(input())
for i in range(0, N):
	(x, y, z) = (int(i) for i in input().split())
	a = max(x, y, z)
	b = min(x, y, z)
	A = [x, y, z]
	maxc = Counter(A)
	if x != y and y != z and (x != z):
		print('NO')
	elif maxc[a] < 2:
		print('NO')
	else:
		print('YES')
		print(a, b, b)


t = int(input())
for i in range(t):
	z = list((int(num) for num in input().split()))
	z.sort()
	if z[1] == max(z[0], z[2]):
		print('YES')
		print(z[0], min(z[0], z[2]), z[2])
	else:
		print('NO')


t = int(input())
f = []
for i in range(t):
	a = list(map(int, input().strip().split()))[:3]
	a.sort()
	if a[0] != a[1] and a[1] == a[2]:
		print('YES')
		a[1] = 1
		listToStr = ' '.join([str(elem) for elem in a])
		print(listToStr)
	elif a[0] == a[1] and a[1] == a[2]:
		print('YES')
		listToStr = ' '.join([str(elem) for elem in a])
		print(listToStr)
	else:
		print('NO')


from collections import defaultdict
t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	if b == c and a <= b:
		print('YES')
		print(1, a, b)
	elif a == b and c <= a:
		print('YES')
		print(1, a, c)
	elif a == c and b <= c:
		print('YES')
		print(a, b, 1)
	else:
		print('NO')


n = int(input())
for i in range(n):
	(a, b, c) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	maxim = max(max(a, b), max(b, c))
	if a == maxim and b == maxim or (a == maxim and c == maxim) or (c == maxim and b == maxim):
		print('YES')
		if b != maxim:
			minim = b
		elif c != maxim:
			minim = c
		else:
			minim = a
		print(1, maxim, minim)
	else:
		print('NO')


T = int(input())
for i in range(T):
	(x, y, z) = map(int, input().split())
	lst = []
	lst.append(x)
	lst.append(y)
	lst.append(z)
	lst.sort()
	flag = -1
	if x != y and y != z and (z != x):
		flag = 1
		print('NO')
	if lst[0] == lst[1] and lst[0] != lst[2]:
		flag = 1
		print('NO')
	if flag == -1:
		a = lst[0]
		b = lst[0]
		c = lst[2]
		print('YES')
		print(a, b, c, sep=' ')


t = int(input())
lst = []
print()
for i in range(0, t):
	a = input()
	lst.append(a.split(' '))
for i in range(0, t):
	x = int(lst[i][0])
	y = int(lst[i][1])
	z = int(lst[i][2])
	if x == y > z:
		print('Yes')
		print(x, z, z)
	elif x == z > y:
		print('Yes')
		print(y, x, y)
	elif z == y > x:
		print('Yes')
		print(x, x, y)
	elif x == y == z:
		print('Yes')
		print(x, x, x)
	else:
		print('No')


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return i
for i in range(int(input())):
	(x, y, z) = getNM()
	if x == y == z:
		print('YES')
		print(x, y, z)
		continue
	(a, b, c) = (-1, -1, -1)
	if len({x, y, z}):
		if x == y:
			a = x
			b = z
			c = 1
		if x == z:
			a = 1
			b = x
			c = y
		if y == z:
			a = x
			b = 1
			c = 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')


T = int(input())
for test in range(T):
	num = list(map(int, input().split()))
	(x, y, z) = sorted(num)
	if y == z:
		print('YES')
		if x == y:
			print(x, x, x)
		else:
			print(x, x, y)
	else:
		print('NO')


def solve(x, y, z):
	if x == y:
		if z <= y:
			return (x, z, 1)
		else:
			return (-1, -1, -1)
	if x == z:
		if z >= y:
			return (x, 1, y)
		else:
			return (-1, -1, -1)
	if z == y:
		if z >= x:
			return (1, x, z)
		else:
			return (-1, -1, -1)
	return (-1, -1, -1)
t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	(x, y, z) = [int(i) for i in input().split()]
	(a, b, c) = solve(x, y, z)
	if a == -1:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


t = int(input())
for z in range(t):
	(x, y, z) = map(int, input().strip().split())
	l = []
	l.append(x)
	l.append(y)
	l.append(z)
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x != y and y != z and (x != z):
		print('NO')
	elif l.count(min(l)) == 2:
		print('NO')
	elif l.count(max(l)) == 2:
		print('YES')
		print(max(l), min(l), min(l))


t = int(input())
for i in range(t):
	integers = [int(s) for s in input().split(' ')]
	x = integers[0]
	y = integers[1]
	z = integers[2]
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y and z < y:
		print('YES')
		print(x, z, z)
	elif y == z and x < y:
		print('YES')
		print(x, x, y)
	elif x == z and y < x:
		print('YES')
		print(y, x, y)
	else:
		print('NO')


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(set((x, y, z))) == 3 or (x, y, z).count(min(x, y, z)) == 2:
		print('NO')
	else:
		print('YES')
		if min(x, y, z) == x:
			print(x, 1, y)
		elif min(x, y, z) == y:
			print(x, y, 1)
		else:
			print(z, x, 1)


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	s = {x, y, z}
	l = len(s)
	if l == 1:
		print('YES')
		print('%d %d %d' % (x, x, x))
	elif l == 2:
		(ma, mi) = (max(s), min(s))
		if (x, y, z).count(ma) == 2:
			print('YES')
			print('%d %d %d' % (ma, mi, mi))
		else:
			print('NO')
	else:
		print('NO')


def main():
	T = int(input())
	for _ in range(T):
		(x, y, z) = map(int, input().split())
		if max(x, y) == max(x, z) == max(y, z):
			print('YES')
			if y == max(x, z):
				print(x, 1, z)
			elif z == max(x, y):
				print(1, x, y)
			elif x == max(y, z):
				print(y, z, 1)
			else:
				print('NO')
		else:
			print('NO')
main()


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	(list, flag) = ([x, y, z], False)
	for i in range(3):
		for j in range(3):
			for k in range(3):
				(a, b, c) = (list[i], list[j], list[k])
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					print('YES')
					print(a, b, c)
					flag = True
					break
			if flag:
				break
		if flag:
			break
	if not flag:
		print('NO')
	t -= 1


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	(x, y, z) = mInt()
	if x == y and z < x and (z < y):
		print('YES')
		print(x, z, z)
	elif x == z and y < x and (z > y):
		print('YES')
		print(x, y, y)
	elif y == z and y > x and (z > x):
		print('YES')
		print(x, x, y)
	elif x == y == z:
		print('YES')
		print(x, x, x)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	aa = [a, b, c]
	aa.sort()
	if aa.count(max(aa)) >= 2:
		print('YES')
		print(max(aa), aa[0], aa[0])
		continue
	else:
		print('NO')


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


t = int(input())
while t > 0:
	(x, y, z) = list(map(int, input().split()))
	L = []
	L.append(x)
	L.append(y)
	L.append(z)
	L.sort(reverse=True)
	counter = 0
	result = ''
	for i in range(len(L) - 2):
		if L[i] == L[i + 1]:
			counter += 1
			result += str(L[0]) + ' ' + str(L[2]) + ' ' + str(1)
	if counter == 1:
		print('YES')
		print(result)
	else:
		print('NO')
	t -= 1


t = int(input())
ans = []
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		ans.append(['YES', x, x, x])
	elif x != y and x != z and (y != z):
		ans.append(['NO'])
	else:
		m = max(x, y, z)
		cnt = 0
		if m == x:
			cnt += 1
		if m == y:
			cnt += 1
		if m == z:
			cnt += 1
		if cnt == 2:
			ans.append(['YES', min(x, y, z), min(x, y, z), max(x, y, z)])
		else:
			ans.append(['NO'])
for i in ans:
	print(i[0])
	for j in range(1, len(i)):
		print(i[j], end=' ')
	if len(i) != 1:
		print()


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	l2 = [x, y, z]
	l = sorted([x, y, z])
	if l[1] == l[2]:
		print('YES')
		if x == l[0]:
			print(l[0], l[0], l[1])
		elif y == l[0]:
			print(l[0], l[1], l[0])
		else:
			print(l[1], l[0], l[0])
	else:
		print('NO')


t = int(input())
resp = list()
number = list()
for i in range(0, t):
	string = input().split()
	a = [0] * 3
	maior = -1
	c1 = 0
	for j in range(0, 3):
		a[j] = int(string[j])
	a = sorted(a, reverse=True)
	for j in range(0, 3):
		if a[j] >= maior:
			c1 += 1
			maior = a[j]
	if c1 >= 2:
		resp.append('YES')
		if c1 == 3:
			number.append(maior)
			number.append(maior)
			number.append(maior)
		else:
			j = 0
			aux = a[j]
			while aux == maior:
				j += 1
				aux = a[j]
			number.append(aux)
			number.append(aux)
			number.append(maior)
	else:
		resp.append('NO')
cont = ''.join(resp[:])
tam = len(cont)
k = 0
for i in range(0, t):
	print(resp[i])
	if resp[i] == 'YES':
		for j in range(k, k + 3):
			print(number[j], end=' ')
			k += 1
		print()


for test_case in range(int(input())):
	(x, y, z) = map(int, input().split())
	arr = [x, y, z]
	arr.sort(reverse=True)
	if arr[0] == arr[1] == arr[2]:
		print('YES')
		print(x, y, z)
	elif arr[0] == arr[1]:
		print('YES')
		print(arr[0], arr[2], arr[2])
	else:
		print('NO')


class solve(object):

	def three_pairwise(self):
		self.n = int(input())
		for i in range(self.n):
			self.a = list(map(int, input().strip().split()))
			self.a.sort()
			if self.a[1] != self.a[2]:
				print('NO')
			else:
				print('YES')
				print(self.a[0], self.a[0], self.a[2])
cc = solve()
cc.three_pairwise()


def slv():
	nums = list(map(int, input().split()))
	nums.sort()
	if nums[0] == nums[1] or nums[0] == nums[2] or nums[1] == nums[2]:
		mx = max(nums)
		mn = min(nums)
		if nums.count(mn) == 2:
			print('NO')
		else:
			print('YES')
			print(mn, mn, mx)
	else:
		print('NO')
t = int(input())
for _ in range(t):
	slv()


def answer(x, y, z):
	a = 0
	b = 0
	c = 0
	if x == y and y == z:
		a = x
		b = x
		c = x
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c)
		return
	if x == y:
		if z > x:
			print('NO')
			return
		if z < y:
			a = x
			b = z
			c = z
			print('YES')
			print(a, end=' ')
			print(b, end=' ')
			print(c)
			return
	if x == z:
		if y > x:
			print('NO')
			return
		if y < x:
			b = x
			c = y
			a = y
			print('YES')
			print(a, end=' ')
			print(b, end=' ')
			print(c)
			return
	if y == z:
		if x > y:
			print('NO')
			return
		if x < y:
			c = y
			a = x
			b = x
			print('YES')
			print(a, end=' ')
			print(b, end=' ')
			print(c)
			return
	print('NO')
	return
t = int(input())
for i in range(t):
	a = [int(x) for x in input().split()]
	answer(a[0], a[1], a[2])


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	(x, y, z) = ip()
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y and x > z or (y == z and y > x) or (x == z and x > y):
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
	else:
		print('NO')


def solve(x, y, z):
	if x == y:
		if y >= z:
			print('YES')
			print(x, z, 1)
		else:
			print('NO')
	elif x == z:
		if x >= y:
			print('YES')
			print(x, y, 1)
		else:
			print('NO')
	elif y == z:
		if y >= x:
			print('YES')
			print(y, x, 1)
		else:
			print('NO')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	solve(x, y, z)


tc = int(input())
while tc:
	(x, y, z) = list(map(int, input().split()))
	mini = min(x, y, z)
	maxi = max(x, y, z)
	rem = x ^ y ^ z
	if mini == rem:
		print('YES')
		print(rem, rem, maxi)
	else:
		print('NO')
	tc -= 1


for _ in range(int(input())):
	X = list(map(int, input().split()))
	X = sorted(X)[::-1]
	(x, y, z) = (X[0], X[1], X[2])
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if y != x:
		print('NO')
		continue
	print('YES')
	print(x, z, z)


a = int(input())
for i in range(a):
	b = input()
	c = [int(x) for x in b.split()]
	if c[0] != c[1] and c[1] != c[2] and (c[2] != c[0]):
		print('NO')
		continue
	elif c[0] == c[1] and c[0] < c[2] or (c[0] == c[2] and c[0] < c[1]) or (c[1] == c[2] and c[1] < c[0]):
		print('NO')
		continue
	elif c[0] == c[1]:
		print('YES')
		print(c[0], c[2], c[2])
	elif c[0] == c[2]:
		print('YES')
		print(c[0], c[1], c[1])
	elif c[2] == c[1]:
		print('YES')
		print(c[2], c[0], c[0])


for x in range(int(input())):
	l = []
	(a, b, c) = map(int, input().split())
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	if len(set(l)) == 1:
		print('YES')
		print(a, a, a)
	elif l[-1] == l[-2]:
		print('YES')
		print(l[0], l[0], l[-1])
	else:
		print('NO')


t = int(input())
while t:
	l = list(map(int, input().split()))
	(x, y, z) = (l[0], l[1], l[2])
	li = []
	if x == y == z:
		li.append(x)
		li.append(y)
		li.append(z)
		print('YES')
		for i in li:
			print(i, end=' ')
	elif x != y and y != z and (x != z):
		print('NO')
	else:
		m = max(l)
		c = 0
		for i in l:
			if i == m:
				c = c + 1
		if c == 1:
			print('NO')
		else:
			mi = min(l)
			li.append(m)
			li.append(mi)
			li.append(mi)
			print('YES')
			for i in li:
				print(i, end=' ')
	t = t - 1


t = int(input())
for _ in range(t):
	xyz = list(map(int, input().rstrip().split()))
	highest = max(xyz)
	count = 0
	number = 0
	for x in xyz:
		if highest == x:
			count += 1
		else:
			number = x
	if count == 1:
		print('NO')
	elif count == 2:
		print('YES')
		print(number, number, highest)
	else:
		print('YES')
		print((str(highest) + ' ') * 3)


from collections import Counter

def ans(a, b, c):
	if a == b == c:
		print('YES')
		return '{} {} {}'.format(a, a, a)
	freq = Counter([a, b, c])
	if len(freq) == 3:
		return 'NO'
	maximum = max(a, b, c)
	minimum = min(a, b, c)
	if freq[maximum] == 2:
		print('YES')
		return '{} {} {}'.format(maximum, minimum, 1)
	else:
		return 'NO'
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	print(ans(a, b, c))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	mi = min(x, y, z)
	mx = max(x, y, z)
	if x == mx and y == mx and (z == mi) or (x == mx and y == mi and (z == mx)) or (x == mi and y == mx and (z == mx)):
		print('YES')
		print(mi, mi, mx)
	else:
		print('NO')


import sys
input = sys.stdin.readline
MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input().strip('\n'))
si = lambda : input().strip('\n')
dgl = lambda : list(map(int, input().strip('\n')))
f = lambda : map(int, input().strip('\n').split())
il = lambda : list(map(int, input().strip('\n').split()))
ls = lambda : list(input().strip('\n'))
lsc = lambda : list(input().strip('\n').split(' '))
lsi = lambda : [int(i) for i in ls()]
let = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(ii()):
	(x, y, z) = sorted(f())
	if y != z:
		print('NO')
	else:
		print('YES')
		print(1, x, y)


t = int(input())
for _ in range(t):
	val_list = list(map(int, input().strip().split(' ')))
	sorted_list = sorted(val_list)
	if sorted_list[1] == sorted_list[2]:
		print('YES')
		print('%s %s %s' % (sorted_list[0], sorted_list[0], sorted_list[1]))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	maxm = max(arr)
	minm = min(arr)
	if arr.count(maxm) < 2:
		print('NO')
	else:
		print('YES')
		print(minm, minm, maxm)


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	x = list(set(l))
	x.sort()
	if len(x) == 3:
		print('NO')
	elif len(x) == 2:
		if l.count(x[-1]) == 2:
			print('YES')
			print(x[0], x[1], x[0], end=' ')
			print()
		else:
			print('NO')
	elif len(x) == 1:
		print('YES')
		print(x[0], x[0], x[0], end=' ')
		print()


for i in range(int(input())):
	num = list(map(int, input().split()))
	if sum(set(num)) != sum(num) and sum(num) - sum(set(num)) == max(num):
		print('Yes')
		print(str(sum(num) - sum(set(num))) + ' ' + str(sum(num) - 2 * (sum(num) - sum(set(num)))) + ' ' + str(sum(num) - 2 * (sum(num) - sum(set(num)))))
	elif len(set(num)) == 1:
		print('Yes')
		print(' '.join((str(item) for item in num)))
	else:
		print('No')


import sys
input = sys.stdin.readline

def readstr():
	return input().strip()

def readint():
	return int(input())

def readnums():
	return map(int, input().split())

def readstrs():
	return input().split()

def main():
	N = readint()
	for _ in range(N):
		nums = tuple(readnums())
		if nums.count(max(nums)) < 2:
			print('NO')
		else:
			a = max(nums)
			b = min(nums)
			c = min(nums)
			print('YES')
			print(a, b, c)
main()


def pairwise_maximum(arr):
	arr.sort()
	if arr[1] == arr[2]:
		print('Yes')
		print(arr[2], arr[0], arr[0])
	else:
		print('No')

def main():
	test_case = int(input())
	while test_case != 0:
		arr = input()
		new_arr = list(map(int, arr.split(' ')))
		pairwise_maximum(new_arr)
		test_case = test_case - 1
main()


t = int(input())
i = 0
while i < t:
	x = list(map(int, input().split()))
	x.sort()
	if x[2] == x[1]:
		print('Yes')
		print(x[0], x[0], x[1])
	else:
		print('No')
	i = i + 1


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	xyz = list(map(int, sys.stdin.readline().split()))
	sorted_xyz = sorted([(xyz[i], i) for i in range(3)])
	if sorted_xyz[2][0] == sorted_xyz[1][0]:
		print('YES')
		print(sorted_xyz[-1][0], sorted_xyz[0][0], sorted_xyz[0][0])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x, sep=' ')
		continue
	elif x == y and z < x:
		a = x
		b = z
		print('YES')
		print(a, b, b, sep=' ')
	elif x == z and y < x:
		b = x
		a = y
		print('YES')
		print(a, b, a, sep=' ')
	elif z == y and x < z:
		c = z
		a = x
		print('YES')
		print(a, a, c, sep=' ')
	else:
		print('NO')


t = int(input())
for q in range(t):
	(a, b, c) = map(int, input().split())
	if [a, b, c].count(max([a, b, c])) >= 2:
		print('YES')
		print(min([a, b, c]), max([a, b, c]), min([a, b, c]))
	else:
		print('NO')


n = int(input())
for _ in range(n):
	numbers = [int(x) for x in input().split()]
	numbers.sort()
	if numbers[0] < numbers[1] and numbers[1] < numbers[2]:
		print('NO')
	elif numbers[0] == numbers[2]:
		print('YES')
		print(f'{numbers[0]} {numbers[0]} {numbers[0]}')
	elif numbers[0] == numbers[1]:
		print('NO')
	elif numbers[1] == numbers[2]:
		print('YES')
		print(f'{numbers[0]} {numbers[0]} {numbers[1]}')
	else:
		print('PROBLEMS')


import math

def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	(x, y, z) = mi()
	ma = max(x, y, z)
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == y and x == ma:
		print('YES')
		print(x, z, z)
	elif x == z and x == ma:
		print('YES')
		print(x, y, y)
	elif z == y and z == ma:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	maximum = max(x, y, z)
	other = 0
	numeq = 0
	if x == maximum and y == maximum and (z == maximum):
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	elif x == maximum and y == maximum:
		print('YES')
		print(str(x) + ' ' + str(z) + ' ' + str(z))
	elif x == maximum and z == maximum:
		print('YES')
		print(str(y) + ' ' + str(x) + ' ' + str(y))
	elif y == maximum and z == maximum:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(y))
	else:
		print('NO')


import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	(x, y, z) = rm()
	if x == y and y == z and (y == z):
		print('YES')
		print(x, y, z)
	elif x == y and z < x:
		print('YES')
		print(x, z, 1)
	elif y == z and x < y:
		print('YES')
		print(1, x, y)
	elif z == x and y < z:
		print('YES')
		print(1, x, y)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	l1 = [int(i) for i in input().split()]
	if l1[0] != l1[1] and l1[1] != l1[2] and (l1[0] != l1[2]):
		print('NO')
	else:
		l1.sort()
		(a, b) = (max(l1), min(l1))
		if l1.count(b) == 2:
			print('NO')
		elif l1.count(a) == 2:
			print('YES')
			print(a, b, b)
		elif l1.count(a) == 3:
			print('YES')
			print(a, a, a)


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	xyz = stdin.readline().split()
	x = int(xyz[0])
	y = int(xyz[1])
	z = int(xyz[2])
	a = max(x, y, z)
	if x == a and y == a or (x == a and z == a) or (y == a and z == a):
		stdout.write('YES\n')
		stdout.write(str(a) + ' ' + str(min(x, y, z)) + ' 1\n')
	else:
		stdout.write('NO\n')


t = int(input().split()[0])
for case in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(str(x) + ' ' + str(x) + ' ' + str(x))
	elif x >= y and x == z:
		print('YES')
		print(str(x) + ' ' + str(y) + ' 1')
	elif y >= x and y == z:
		print('YES')
		print(str(x) + ' ' + str(y) + ' 1')
	elif x >= z and x == y:
		print('YES')
		print(str(x) + ' ' + str(z) + ' 1')
	else:
		print('NO')


t = int(input())
for i in range(t):
	xyz = sorted([int(x) for x in input().split()])
	if xyz[1] != xyz[2]:
		print('NO')
	else:
		print('YES\n{} {} {}'.format(str(xyz[0]), str(xyz[0]), str(xyz[1])))


t = 1
t = int(input())
while t:
	t -= 1
	(x, y, z) = list(map(int, input().split()))
	a = set([x, y, z])
	if len(a) == 1:
		print('YES')
		print(x, x, x)
	if len(a) == 2:
		b = sorted([x, y, z])
		if b[0] == b[1]:
			print('NO')
		else:
			print('YES')
			print(1, min(b), max(b))
	if len(a) == 3:
		print('NO')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	l.sort()
	if l[0] == l[1] and l[1] != l[2]:
		print('NO')
		continue
	elif l[0] != l[1] and l[1] != l[2]:
		print('NO')
		continue
	print('YES')
	if l[0] == l[1] and l[1] == l[2]:
		print(l[0], l[0], l[0])
	elif l[1] == l[2]:
		print(l[0], l[0], l[1])


import sys
import collections

def input():
	return sys.stdin.readline().rstrip()

def split_input():
	return [int(i) for i in input().split()]
tests = int(input())
for _ in range(tests):
	l = split_input()
	l.sort()
	if l[1] == l[2]:
		print('Yes')
		print(l[0], l[0], l[1])
	else:
		print('No')


def get_numbers(maxes: [int]) -> [int]:
	if maxes[0] == maxes[2]:
		return maxes
	elif maxes[0] == maxes[1]:
		return [maxes[0], maxes[2], maxes[2] - 1] if maxes[2] - 1 > 0 else [maxes[0], maxes[2], maxes[2]]
	elif maxes[1] == maxes[2]:
		return []
	else:
		return []
for i in range(int(input().strip())):
	maxes = [int(ch) for ch in input().strip().split()]
	numbers = get_numbers(sorted(maxes, reverse=True))
	if len(numbers) and all([num > 0 for num in numbers]):
		print('YES')
		print(' '.join([str(num) for num in numbers]))
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		(x, y, z) = RL()
		sm = x + y + z
		(ma, mi) = (max(x, y, z), min(x, y, z))
		if ma == mi:
			print('YES')
			print(ma, ma, ma)
		elif y == z and y == ma or (x == y and x == ma) or (x == z and x == ma):
			print('YES')
			print(ma, mi, mi)
		else:
			print('NO')
main()


for _ in range(int(input())):
	(a, b, c) = sorted([int(x) for x in input().split(' ')])
	if b != c:
		print('NO')
	else:
		print('YES')
		print(a, a, c)


def read_list():
	return list(map(int, input().split(' ')))

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	a = read_list()
	if len(set(a)) == 3:
		print('NO')
	elif a.count(min(a)) == 2:
		print('NO')
	else:
		print('YES')
		if len(set(a)) == 1:
			print_list(a)
		else:
			print_list([max(a), min(a), min(a)])


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	res = sorted(l, reverse=True)
	a = max(res)
	b = min(res)
	c = 1
	if res[0] == max(a, b) and res[1] == max(a, c) and (res[2] == max(b, c)):
		print('YES')
		print(a, b, c)
	else:
		print('NO')


test_case = int(input())
for _ in range(test_case):
	m = list(map(int, input().split()))
	a = sorted(list(set(m)))
	if len(a) == 3:
		print('NO')
	elif len(a) == 2:
		if m.count(a[0]) > 1:
			print('NO')
		else:
			print('YES')
			print(a[0], a[1], 1)
	else:
		print('YES')
		print(a[0], a[0], a[0])


for _ in range(int(input())):
	a = list((int(x) for x in input().split()))
	x = a[0]
	y = a[1]
	z = a[2]
	count = 0
	l = len(a)
	m = max(a)
	for i in range(l):
		if a[i] == m:
			count = count + 1
	if count <= 1:
		print('NO')
	else:
		if x == y and x == z:
			(d, b, c) = (x, y, z)
		elif x == z and x > y:
			d = x
			b = y
			c = b - 1
		elif y == z and x < y:
			d = y
			b = x
			c = b - 1
		elif x == y and y > z:
			d = x
			b = z
			c = b - 1
		print('YES')
		print(d, end=' ')
		print(b, end=' ')
		if c == 0:
			print('1')
		else:
			print(c)


for _ in range(int(input())):
	(x, y, z) = [int(i) for i in input().split()]
	m = max(x, y, z)
	c = 0
	if m == x:
		c = c + 1
	if m == y:
		c = c + 1
	if m == z:
		c = c + 1
	if c >= 2:
		print('YES')
		print(m, 1, min(x, y, z))
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	k = 0
	if a >= b and a >= c:
		k = a
		if k != b and k != c:
			print('NO')
			continue
	elif b >= c and b >= a:
		k = b
		if k != c:
			print('NO')
			continue
	else:
		print('NO')
		continue
	if k == a:
		print('YES')
		print(k, end=' ')
		if k != b:
			print(b, b, sep=' ')
			continue
		else:
			print(c, c, sep=' ')
			continue
	print('YES')
	print(a, a, k, sep=' ')
	continue


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def main():
	t = inp()
	for _ in range(t):
		(x, y, z) = invr()
		count = defaultdict(lambda : 0)
		count[x] += 1
		count[y] += 1
		count[z] += 1
		s = set([x, y, z])
		if len(s) > 2:
			print('NO')
		elif len(s) == 1:
			print('YES')
			print(x, y, z)
		else:
			mx = max(s)
			mn = min(s)
			if count[mx] > count[mn]:
				print('YES')
				print(*s, end=' ')
				print(1)
			else:
				print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
for i in range(n):
	a = ''
	a = input().split()
	b = []
	b.append(int(a[0]))
	b.append(int(a[1]))
	b.append(int(a[2]))
	b.sort()
	if b[2] == b[1]:
		print('YES')
		print(b[0], ' ', b[0], ' ', b[2])
	else:
		print('NO')


import sys, bisect
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	(a1, b1, c1) = (0, 0, 0)
	a = max(x, y, z)
	b = x
	c = 0
	if x < a:
		c = c + 1
	if y < a:
		c = c + 1
		b = y
	if z < a:
		c = c + 1
		b = z
	if c == 2:
		print('NO')
	else:
		print('YES')
		print(min(z, x), min(x, y), min(y, z))


def main():
	l = 1
	T = int(input())
	out = ''
	while l != T + 1:
		(x, y, z) = map(int, input().split(' '))
		out += f'{solve(x, y, z)}\n'
		l += 1
	print(out, flush=True)

def solve(x, y, z):
	sort = sorted([x, y, z])
	if sort[1] == sort[2]:
		return f'YES\n{sort[2]} {sort[0]} {sort[0]}'
	else:
		return 'NO'
main()


def solve(x, y, z):
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y > z:
		print('YES')
		print(x, z, z)
	elif y == z > x:
		print('YES')
		print(x, x, z)
	elif x == z > y:
		print('YES')
		print(y, y, x)
	else:
		print('NO')
t = int(input())
while t != 0:
	t -= 1
	(x, y, z) = [int(i) for i in input().split()]
	solve(x, y, z)


n = int(input())
while n:
	n -= 1
	(x, y, z) = map(int, input().split(' '))
	if x == y or y == z or z == x:
		if x == y and y == z:
			print('YES')
			print(x, x, x)
		elif x == y and x > z or (x == z and x > y) or (y == z and y > x):
			print('YES')
			if min(x, y, z) == 1:
				print(max(x, y, z), min(x, y, z), min(x, y, z))
			else:
				print(max(x, y, z), min(x, y, z), min(x, y, z) - 1)
		else:
			print('NO')
	else:
		print('NO')


import sys
infile = sys.stdin
next(infile)
for line in infile:
	l = list(map(int, line.split()))
	x = l[0]
	y = l[1]
	z = l[2]
	ans = [0, 0, 0]
	if x == y and y == z:
		ans = [x, x, x]
		print('YES')
		print(*ans)
	elif x != y and y != z and (x != z):
		print('NO')
	elif l.count(max(l)) == 1:
		print('NO')
	else:
		ans[0] = max(l)
		ans[1] = ans[2] = min(l)
		print('YES')
		print(*ans)


t = int(input())
for tt in range(t):
	l = list(map(int, input().split()))
	l.sort()
	st = set(l)
	m = min(l)
	if len(st) == 2 and l.count(m) == 1:
		print('YES')
		print(l[0], l[0], l[2])
	elif len(st) == 1:
		print('YES')
		print(*l)
	else:
		print('NO')


try:
	t = int(input())
	for v in range(t):
		(x, y, z) = map(int, input().split())
		maxi = max(x, y, z)
		if maxi == x and maxi == y or (maxi == y and maxi == z) or (maxi == x and maxi == z):
			print('YES')
			print(maxi, min(x, y, z), min(x, y, z))
		else:
			print('NO')
except:
	pass


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	(a, b, c) = (0, 0, 0)
	if x == y:
		a = x
	if y == z:
		c = y
	if z == x:
		b = z
	r = max(a, b, c)
	s = a + b + c
	t = min(x, y, z)
	if r >= max(x, y, z) and s != 0:
		print('YES')
		if a != 0:
			print(a, t, t)
		elif b != 0:
			print(t, b, t)
		else:
			print(t, t, c)
	else:
		print('NO')


def solve(nums):
	nums = sorted(nums)
	if nums[-1] == nums[-2]:
		return (nums[-3], nums[-3], nums[-1])
	return None
for _ in range(int(input())):
	(*nums,) = map(int, input().split())
	res = solve(nums)
	if res is None:
		print('NO')
	else:
		print('YES')
		print(*res)


n = int(input())
for i in range(n):
	xyz = [int(j) for j in input().split()]
	m = max(xyz)
	del xyz[xyz.index(m)]
	if max(xyz) == m:
		print('YES')
		print(m, min(xyz), 1)
	else:
		print('NO')


t = int(input())

def func(x, y, z):
	a = x
	if z == x:
		b = x
		c = x
		print('YES')
		return (a, b, c)
	elif z < x:
		b = z
		c = z
		print('YES')
		return (a, b, c)
	else:
		print('NO')
		return (0, 0, 0)
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y:
		(a, b, c) = func(x, y, z)
	elif y == z:
		(b, c, a) = func(y, z, x)
	elif x == z:
		(a, c, b) = func(x, z, y)
	else:
		print('NO')
		a = 0
		b = 0
		c = 0
	if (a, b, c) != (0, 0, 0):
		print(a, b, c)


t = int(input())
while t:
	t = t - 1
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y:
		if x > z:
			print('YES')
			print(x, z, z)
		else:
			print('NO')
	elif y == z:
		if y > x:
			print('YES')
			print(x, y, x)
		else:
			print('NO')
	elif x == z:
		if x > y:
			print('YES')
			print(x, y, y)
		else:
			print('NO')
	else:
		print('NO')


testcase = int(input())
for i in range(testcase):
	li = list(map(int, input().split()))[:3]
	li.sort()
	if li[1] == li[2]:
		print('YES')
		print(li[2], li[0], li[0])
	else:
		print('NO')


n = int(input())
for i in range(n):
	al = []
	(a, b, c) = map(int, input().split())
	al.append(a)
	al.append(b)
	al.append(c)
	if len(set(al)) <= 2:
		al.sort()
		if al.count(max(al)) == 2:
			print('YES')
			print(al[2], al[0], 1)
		elif al.count(max(al)) == 3:
			print('YES')
			print(al[0], al[1], al[2])
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for i in range(n):
	k = list(map(int, input().split()))
	k = sorted(k)
	if k[1] == k[2]:
		print('YES')
		print(k[2], end=' ')
		print(k[0], end=' ')
		print(k[0])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split(' '))
	pos = [[x, y], [z, x], [y, z]]
	a = []
	for i in range(2):
		for j in range(2):
			for k in range(2):
				q = pos[0][i]
				w = pos[1][j]
				e = pos[2][k]
				a.append([q, w, e])
	ans = 'NO'
	for item in a:
		a1 = item[0]
		b1 = item[1]
		c1 = item[2]
		if x == max(a1, b1) and y == max(a1, c1) and (z == max(b1, c1)):
			ans = 'YES'
			break
	if ans == 'YES':
		print(ans)
		print(a1, b1, c1)
	else:
		print(ans)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(x, y, z) = sorted(I())
	if y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = [int(x0) for x0 in input().split()]
	if x == min(x, y, z) and y == z:
		print('YES')
		print(x, x, z)
	elif y == min(x, y, z) and x == z:
		print('YES')
		print(y, z, y)
	elif z == min(x, y, z) and x == y:
		print('YES')
		print(x, z, z)
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	if x != y and x != z and (z != y):
		print('NO')
		continue
	elif x == y and x == z and (y == z):
		print('YES')
		print(x, x, x)
		continue
	else:
		ma = max(x, y, z)
		mi = min(x, y, z)
		mac = 0
		if x == ma:
			mac += 1
		if y == ma:
			mac += 1
		if z == ma:
			mac += 1
		if mac != 2:
			print('NO')
			continue
		else:
			print('YES')
			print(mi, mi, ma)


from typing import Dict
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split(' '))
	if x == y and x >= z:
		print('YES')
		print(x, z, z)
	elif y == z and y > x:
		print('YES')
		print(x, x, y)
	elif z == x and z > y:
		print('YES')
		print(y, z, y)
	else:
		print('NO')


from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
import math
rl = lambda : stdin.readline()
rll = lambda : stdin.readline().split()
rli = lambda : map(int, stdin.readline().split())
rlf = lambda : map(float, stdin.readline().split())
(INF, NINF) = (float('inf'), float('-inf'))

def main():
	T = int(rl())
	for _ in range(T):
		L = list(rli())
		L.sort()
		(x, y, z) = L
		if x == y == z:
			print('YES')
			print(x, y, z)
		elif y == z and x < y:
			print('YES')
			print(x, x, z)
		else:
			print('NO')
	stdout.close()
main()


total = int(input())
for _ in range(total):
	b = list(map(int, input().strip().split(' ')))
	b.sort()
	if b[0] <= b[1] and b[1] == b[2]:
		print('YES')
		print(str(b[0]) + ' ' + str(b[0]) + ' ' + str(b[2]))
	else:
		print('NO')


def maxima():
	t = int(input())
	for i in range(t):
		a = list(map(int, input().split()))
		if a[0] != a[1] and a[1] != a[2] and (a[0] != a[2]):
			print('NO')
		elif a[0] == a[1] and a[2] > a[0]:
			print('NO')
		elif a[0] == a[2] and a[1] > a[0]:
			print('NO')
		elif a[1] == a[2] and a[0] > a[1]:
			print('NO')
		else:
			print('YES')
			print(max(a[0], a[1], a[2]), min(a[0], a[1], a[2]), min(a[0], a[1], a[2]))
maxima()


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = 0
	if x == y or y == z:
		a += 1
	if x == z:
		a += 1
	if a == 0:
		print('NO')
	elif a == 1:
		if x == y:
			if z > x:
				print('NO')
			else:
				print('YES')
				print(x, z, z)
		elif y == z:
			if x > y:
				print('NO')
			else:
				print('YES')
				print(y, x, x)
		elif x == z:
			if y > x:
				print('NO')
			else:
				print('YES')
				print(x, y, y)
	elif a == 2:
		print('YES')
		print(x, y, z)


from sys import *
from collections import *
from math import *
input = stdin.readline
for tcase in range(int(input())):
	arr = list(map(int, input().split()))
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
		continue
	print('YES')
	arr.append(1)
	(arr[1], arr[2]) = (arr[0], arr[1])
	for i in range(1, 4):
		print(arr[i], end=' ')
	print()


T = int(input())
for i in range(0, T):
	X = list(map(int, input().split()))
	X.sort()
	X.reverse()
	if X[0] == X[1] and X[1] == X[2]:
		print('YES')
		print(X[0], X[0], X[0])
	elif X[0] == X[1] and X[1] != X[2]:
		print('YES')
		print(X[0], X[2], X[2])
	else:
		print('NO')


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	m = [x, y, z]
	m.sort(reverse=True)
	if m[0] > m[1]:
		print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(m[0], m[2], m[2]))
	t -= 1


def solve(x, y, z):
	maxel = max(x, y, z)
	minel = min(x, y, z)
	if x == y == maxel or x == z == maxel or y == z == maxel:
		print('YES')
		print(maxel, minel, 1)
	else:
		print('NO')
	return
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	solve(x, y, z)


def main():
	t = int(input())
	for _ in range(t):
		x = list(map(int, input().split()))
		x.sort()
		if x[0] == x[1] == x[2]:
			print('YES')
			print(x[0], x[0], x[0])
		elif x[1] == x[2]:
			print('YES')
			print(x[0], x[0], x[1])
		else:
			print('NO')
main()


import sys
from collections import defaultdict, deque
import math
INF = float('inf')
MOD = 10 ** 9 + 7
inpline = lambda : [int(s) for s in sys.stdin.readline().split()]
_ = 1
_ = int(input())
while _:
	a = inpline()
	a.sort()
	if a[2] == a[1]:
		print('YES')
		print(a[0], a[0], a[2])
	else:
		print('NO')
	_ -= 1


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	mx = max(a)
	cnt = a.count(mx)
	if a[0] == a[1] == a[2]:
		print('YES')
		print(*a)
		continue
	elif cnt == 2:
		print('YES')
		print(mx, min(a), min(a))
	else:
		print('NO')


def solve():
	l = list(map(int, input().strip().split(' ')))
	l.sort()
	if l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(l[0], l[0], l[2]))

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


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	if x == y == z:
		print('YES')
		print(' '.join(map(str, [x, x, x])))
	elif x == y:
		if x > z:
			print('YES')
			print(' '.join(map(str, [x, z, z])))
		else:
			print('NO')
	elif y == z:
		if x > y:
			print('NO')
		else:
			print('YES')
			print(' '.join(map(str, [x, x, y])))
	elif x == z:
		if y > x:
			print('NO')
		else:
			print('YES')
			print(' '.join(map(str, [y, x, y])))
	else:
		print('NO')


import sys
for b in range(0, int(sys.stdin.readline())):
	l = list(map(int, sys.stdin.readline().split()))
	m = max(l)
	if l.count(m) == 3:
		sys.stdout.write('YES\n' + (str(m) + ' ') * 3 + '\n')
	elif l.count(m) == 2:
		sys.stdout.write('YES\n' + (str(min(l)) + ' ') * 2 + str(m) + ' \n')
	else:
		sys.stdout.write('NO\n')


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	x = [a, b, c]
	x.sort()
	if x[1] != x[2]:
		print('NO')
		continue
	print('YES')
	print(x[0], x[0], x[2])


n = int(input())
ans = []
for i in range(n):
	l = list(map(int, input().split()))
	l.sort()
	if l[0] < l[2] and l[1] < l[2]:
		ans += [['NO']]
	elif l[0] == l[2]:
		ans += [[l[0], l[0], l[0]]]
	else:
		ans += [[l[0], l[2], 1]]
for i in ans:
	if len(i) == 1:
		print('NO')
	else:
		print('YES')
		for j in i:
			print(j, end=' ')
		print()


from collections import Counter
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and y != z and (x != z):
		print('NO')
	elif x == y:
		if x < z:
			print('NO')
		else:
			print('YES')
			print(x, z, z)
	elif y == z:
		if y < x:
			print('NO')
		else:
			print('YES')
			print(x, x, y)
	elif x < y:
		print('NO')
	else:
		print('YES')
		print(y, z, y)


num = int(input(''))

def check(x, y, z):
	if x == z and x > y:
		print('YES')
		if y == 1:
			print(x, y, y)
		else:
			print(x, y, y - 1)
	elif x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y and x > z:
		print('YES')
		if z == 1:
			print(z, y, z)
		else:
			print(z, y, z - 1)
	elif z == y and z > x:
		print('YES')
		if x == 1:
			print(x, x, z)
		else:
			print(x, x - 1, z)
	else:
		print('NO')
i = 0
while i < num:
	(x, y, z) = input('').split()
	check(int(x), int(y), int(z))
	i += 1


for _ in ' ' * int(input()):
	a = list(map(int, input().split()))
	if a.count(max(a)) < 2:
		print('NO')
	else:
		print('YES')
		print(max(a), min(a), 1)


t = int(input())
for j in range(t):
	temp = input()
	(x, y, z) = temp.split(' ')
	x = int(x)
	y = int(y)
	z = int(z)
	count = 0
	maxnum = max(max(x, y), z)
	minnum = min(min(x, y), z)
	cmax = 0
	cmin = 0
	if x == maxnum:
		cmax += 1
	elif x == minnum:
		cmin += 1
	if y == maxnum:
		cmax += 1
	elif y == minnum:
		cmin += 1
	if z == maxnum:
		cmax += 1
	elif z == minnum:
		cmin += 1
	if cmax >= 2:
		print('YES')
		print(minnum, minnum, maxnum)
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = sorted([int(i) for i in input().split()])
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b:
		print('NO')
	elif b == c:
		print('YES')
		print(a, a, c)
	else:
		print('NO')


try:
	t = int(input())
	for i in range(t):
		(x, y, z) = map(int, input().split())
		m = max(x, y, z)
		m2 = min(x, y, z)
		count = 0
		if m == x:
			count += 1
		if m == y:
			count += 1
		if m == z:
			count += 1
		if count == 3:
			print('YES')
			print(x, y, z)
		elif count == 2:
			print('YES')
			print(m, m2, m2)
		else:
			print('NO')
except:
	pass


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(a, b, c) = In()
		if a == b and b == c:
			yes()
			print(a, b, c)
		else:
			l = [a, b, c]
			l.sort()
			if l[1] == l[2]:
				yes()
				print(l[0], l[0], l[2])
			else:
				no()
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


tc = int(input())
while tc > 0:
	tc -= 1
	k = list(map(int, input().split()))
	k = sorted(k, reverse=True)
	if k[0] != k[1]:
		print('NO')
	else:
		print('YES')
		print(k[0], k[2], k[2])


import sys
test_cases = int(input())
list_of_cases = []
for i in range(test_cases):
	(x, y, z) = map(int, input().split(' '))
	list_of_cases.append((x, y, z))
for i in range(test_cases):
	(x, y, z) = list_of_cases[i]
	valid_numbers_max = max(x, y, z)
	a = x
	b = y
	flag = 0
	for a in (x, y, z):
		for b in (x, y, z):
			for c in (x, y, z):
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)) and (flag != 1):
					print('YES')
					print(a, b, c)
					flag = 1
					break
	if flag != 1:
		print('NO')


from collections import Counter
n = int(input())
L = []
for i in range(n):
	arr = Counter([int(x) for x in input().split()])
	if len(arr) == 3:
		L.append('NO')
		continue
	t = max(arr.keys())
	t2 = min(arr.keys())
	if arr[t] == 1:
		L.append('NO')
	else:
		L.append([t, t2, t2])
for l in L:
	if l == 'NO':
		print(l)
	else:
		print('YES')
		for d in l:
			print(d, end=' ')
		print()


T = int(input())
for _ in range(T):
	s = list(map(int, input().split()))
	s = sorted(s)
	if s[1] == s[2]:
		a = s[2]
		b = s[0]
		c = s[0]
		print('YES')
		print(a, b, c)
	else:
		print('NO')


import sys
tests = int(sys.stdin.readline().split()[0])
for test in range(tests):
	numbers = [int(i) for i in sys.stdin.readline().split()]
	numbers.sort()
	(x, y, z) = (numbers[0], numbers[1], numbers[2])
	if y == z:
		print('YES')
		if x == y and y == z:
			print(x, y, z)
		else:
			print(1, x, z)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	arr = [x, y, z]
	if len(set(arr)) == 3:
		print('NO')
	if x == y == z:
		print('YES')
		print(x, y, z)
	if x == y and x < z or (z == y and z < x) or (x == z and z < y):
		print('NO')
	if x == y and x > z or (z == y and z > x) or (x == z and z > y):
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	we = max(x, y, z)
	if x == y:
		if y == z:
			print('YES')
			print(x, y, z)
		elif we == x:
			print('YES')
			print(we, z, z)
		else:
			print('NO')
	elif x == z:
		if we == x:
			print('YES')
			print(y, we, y)
		else:
			print('NO')
	elif y == z:
		if y == we:
			print('YES')
			print(x, x, we)
		else:
			print('NO')
	else:
		print('NO')


def func():
	arr = [int(i) for i in input().split()]
	for a in arr:
		for b in arr:
			for c in arr:
				if arr[0] == max(a, b) and arr[1] == max(a, c) and (arr[2] == max(b, c)):
					print('YES')
					print(a, b, c)
					return
	print('NO')
t = int(input())
for i in range(t):
	func()


t = int(input())
for _ in range(0, t):
	li = list(map(int, input().split(' ')))
	mx = max(li)
	mn = min(li)
	lis = li[:]
	lis.remove(mx)
	mxx = max(lis)
	count = 0
	for x in li:
		if mx == x:
			count += 1
	count1 = 0
	for x in li:
		if x == mn:
			count1 += 1
	if count == 2:
		print('YES')
		if li[0] == li[1] or li[1] == li[2]:
			mxx = min(lis)
			print(mx, end=' ')
			print(mxx, end=' ')
			print(mxx)
		else:
			mxx = min(lis)
			print(mx, end=' ')
			print(mxx, end=' ')
			if mxx == 1:
				print(mxx)
			else:
				print(mxx - 1)
	elif count == 3:
		print('YES')
		for x in li:
			print(x, end=' ')
		print(' ')
	else:
		print('NO')


from sys import stdin, exit, setrecursionlimit
from bisect import *
from collections import deque
setrecursionlimit(10000000)
from math import *
from collections import deque
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	a = lmi()
	if a.count(max(a)) == 2:
		print('YES')
		print(max(a), min(a), min(a))
	elif a.count(max(a)) == 3:
		print('YES')
		print(max(a), max(a), max(a))
	else:
		print('NO')


for test in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = sorted([x, y, z])
	if a[2] != a[1]:
		print('NO')
	else:
		print('YES')
		if x == y:
			print(x, z, z)
		elif y == z:
			print(x, x, y)
		elif x == z:
			print(y, x, y)


def ans(a):
	count_max = 0
	w = max(a)
	for i in a:
		if i == w:
			count_max += 1
	if count_max == 1:
		return 'NO'
	print('YES')
	if count_max == 3:
		s = ''
		x = a[0]
		for i in a:
			s = s + str(x) + ' '
		return s
	a1 = max(a)
	b = min(a)
	c = min(a)
	return str(a1) + ' ' + str(b) + ' ' + str(c)
m = int(input())
for i in range(m):
	arr = input().split()
	a = []
	for i in arr:
		a.append(int(i))
	print(ans(a))


import sys
from collections import defaultdict as dd
from collections import Counter as cc
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = lambda : sys.stdin.buffer.readline().rstrip()
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	k = max(x, y, z)
	if k == x and k == y or (k == z and k == y) or (k == x and k == z):
		print('YES')
		print(min(x, y, z), min(x, y, z), k)
	else:
		print('NO')


no = int(input())
string = []
for i in range(no):
	string.append(input())
for alpha in string:
	test = alpha.split()
	mini = min(int(test[0]), int(test[1]), int(test[2]))
	maxi = max(int(test[0]), int(test[1]), int(test[2]))
	count_mini = 0
	count_maxi = 0
	for i in test:
		if int(i) == mini:
			count_mini += 1
	for i in test:
		if int(i) == maxi:
			count_maxi += 1
	if count_mini == 2 or count_maxi == 1:
		print('NO')
	else:
		print('YES')
		if count_mini == 3:
			a = int(test[0])
			b = int(test[1])
			c = int(test[2])
			print(a, b, c)
		else:
			a = int(maxi)
			b = int(mini)
			c = 1
			print(a, b, c)


from collections import defaultdict
import math
inp = lambda : map(int, input().split())
num = lambda : int(input())
t = num()
for _ in range(t):
	(x, y, z) = inp()
	m = max(x, y, z)
	mi = -1
	if x == y:
		mi = x
	elif y == z:
		mi = y
	elif z == x:
		mi = z
	if mi == m:
		print('YES')
		print(min(x, y, z), min(x, y, z), m)
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		(a, b, c) = list(map(int, input().split()))
		if len({a, b, c}) == 1:
			print('YES')
			print(a, b, c)
		elif len({a, b, c}) == 2:
			large = max(a, b, c)
			small = min(a, b, c)
			if (a == large) + (b == large) + (c == large) == 1:
				print('NO')
			else:
				print('YES')
				print(large, small, small)
		elif len({a, b, c}) == 3:
			print('NO')
main()


for _ in range(int(input())):
	x = list(map(int, input().split()))
	(l1, l2) = (max(x), min(x))
	if x.count(l1) >= 2 and l1 >= l2:
		print('YES')
		print(l1, l2, l2)
	else:
		print('NO')


tests = int(input())
for t in range(tests):
	ls = list(map(int, input().split()))
	res = []
	status = True
	if ls[0] <= ls[1] and ls[0] <= ls[2]:
		res.append(ls[0])
		if ls[1] == ls[2]:
			print('YES')
			res.append(ls[1])
			res.append(ls[0])
		else:
			print('NO')
			status = False
	elif ls[0] == ls[1]:
		if ls[2] < ls[0]:
			res.append(ls[0])
			res.append(ls[2])
			res.append(ls[2])
			print('YES')
		else:
			print('NO')
	elif ls[0] == ls[2]:
		if ls[1] < ls[0]:
			res.append(ls[0])
			res.append(ls[1])
			res.append(ls[1])
			print('YES')
		else:
			print('NO')
	else:
		print('NO')
	if status:
		print(' '.join(list(map(str, res))))


for _ in range(int(input())):
	s = set()
	(a, b, c) = map(int, input().split())
	s.add(a)
	s.add(b)
	s.add(c)
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif len(s) != 2:
		print('NO')
	elif a == b and c > a or (b == c and a > b) or (c == a and b > a):
		print('NO')
	else:
		print('YES')
		if a == max(a, b, c):
			print(a, min(a, b, c), min(a, b, c))
		elif b == max(a, b, c):
			print(min(a, b, c), b, min(a, b, c))
		else:
			print(min(a, b, c), min(a, b, c), c)


import sys
input = sys.stdin.readline
n = int(input())
for _ in range(n):
	(x, y, z) = map(int, input().split())
	a = b = c = -1
	if x == z:
		b = x
	if y == x:
		a = y
	if y == z:
		c = z
	if b != -1 and c != -1 and (a != -1):
		print('YES')
		print(a, b, c)
	elif b != -1 and y < b:
		a = y
		c = a
		print('YES')
		print(a, b, c)
	elif c != -1 and x < c:
		b = x
		a = b
		print('YES')
		print(a, b, c)
	elif a != -1 and z < a:
		b = z
		c = z
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	m = max(l)
	if l.count(m) == 1:
		print('NO')
	else:
		print('YES')
		ans = [m, min(l), min(l)]
		print(*ans)


n = int(input())
while n:
	arr = list(map(int, input().split()))
	m = max(arr)
	c = arr.count(m)
	if c >= 2:
		print('YES')
		if c == 2:
			for i in arr:
				if i != m:
					break
			print(i, m, 1)
		else:
			print(m, m, m)
	else:
		print('NO')
	n -= 1


for _ in range(int(input())):
	l = list(map(int, input().split()))
	mx = max(l)
	mn = min(l)
	if l.count(mx) >= 2:
		ans = 1
		if l[0] != mx:
			(a, b) = (mn, mn)
			c = mx
		elif l[1] != mx:
			(a, c) = (mn, mn)
			b = mx
		else:
			(b, c) = (mn, mn)
			a = mx
	else:
		ans = 0
	if ans:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


from sys import stdin, stdout
import math
import heapq
t = 1

def aint():
	return int(input().strip())

def lint():
	return list(map(int, input().split()))

def fint():
	return list(map(int, stdin.readline().split()))

def main():
	l = lint()
	l.sort()
	if l[1] != l[2]:
		print('NO')
	elif l[0] == l[1]:
		print('YES')
		print(*l)
	else:
		print('YES')
		print(1, l[0], l[2])
	return
t = int(input())
for i in range(t):
	main()


t = int(input())
for _ in range(t):
	nos = [int(x) for x in input().strip().split()]
	if any((i < 1 for i in nos)):
		print('NO')
		continue
	mx = max(nos)
	mn = min(nos)
	if nos.count(mx) > 1:
		print('YES')
		print('{} {} {}'.format(mx, mn, mn))
		continue
	print('NO')


t = int(input())
while t:
	t -= 1
	j = list(map(int, input().split()))
	j.sort()
	if j[1] != j[-1]:
		print('NO')
	else:
		print('YES')
		print(j[-1], j[0], j[0])


import math
t = int(input())
for _ in range(t):
	nums = [int(i) for i in input().split(' ')]
	nums.sort()
	if nums[2] == nums[1]:
		print('YES')
		print(nums[2], nums[0], nums[0])
	else:
		print('NO')


import sys
import math
from collections import defaultdict
fi = sys.stdin.readline
fii = lambda : int(fi())
fis = lambda : fi()
fil = lambda : [int(x) for x in fi().split(' ')]
fif = lambda : float(fi())

def go(i, j, k, a, b, c, d):
	x = d['x'][i]
	y = d['y'][j]
	z = d['z'][k]
	if max(x, y) == a and max(x, z) == b and (max(y, z) == c):
		return True
	return False

def solve():
	(a, b, c) = fil()
	d = defaultdict(list)
	d['x'] = [a, b]
	d['y'] = [a, c]
	d['z'] = [b, c]
	flag = False
	for i in range(2):
		if flag:
			break
		for j in range(2):
			if flag:
				break
			for k in range(2):
				res = go(i, j, k, a, b, c, d)
				if res:
					flag = True
					print('YES')
					print(d['x'][i], d['y'][j], d['z'][k])
					break
	if not flag:
		print('NO')
t = fii()
for _ in range(t):
	solve()


for _ in range(int(input())):
	j = list(map(int, input().split()))
	j.sort()
	a = 1
	b = max(j)
	c = min(j)
	e = max(a, b)
	f = max(c, a)
	g = max(b, c)
	h = [e, f, g]
	h.sort()
	if j[0] == j[1] == j[2]:
		print('YES')
		print(j[0], j[1], j[2])
	elif h[0] == j[0] and h[1] == j[1] and (h[2] == j[2]):
		print('Yes')
		print(a, b, c)
	else:
		print('NO')


test_cases = int(input())
inputs = []
for i in range(test_cases):
	the_numbers = str(input())
	inputs.append(the_numbers)
for a1 in inputs:
	a = a1.split(' ')
	split_numbers = set(a1.split(' '))
	split_numbers = list(split_numbers)
	if len(split_numbers) == 3:
		print('NO')
	elif len(split_numbers) == 2:
		bigger_num = int(split_numbers[0])
		if bigger_num < int(split_numbers[1]):
			bigger_num = int(split_numbers[1])
		if int(a[0]) == bigger_num and int(a[1]) == bigger_num or (int(a[1]) == bigger_num and int(a[2]) == bigger_num) or (int(a[0]) == bigger_num and int(a[2]) == bigger_num):
			print('YES')
			print('{} {} 1'.format(split_numbers[0], split_numbers[1]))
		else:
			print('NO')
	else:
		print('YES')
		print('{} {} {}'.format(split_numbers[0], split_numbers[0], split_numbers[0]))


def uchtalik_sonlar_mumkinmi(x, y, z):
	Max = max(x, y, z)
	Min = min(x, y, z)
	if x <= y and y <= z or (z <= y and y <= x):
		Med = y
	if y <= z and z <= x or (x <= z and z <= y):
		Med = z
	if y <= x and x <= z or (z <= x and x <= y):
		Med = x
	if Max == Med == Min:
		return ['YES', str(Max), str(Max), str(Max)]
	elif Max == Med:
		return ['YES', str(Max), str(Min), str(Min)]
	elif Med == Min:
		return 'NO'
	elif Max != Med and Med != Min:
		return 'NO'
t = int(input())
natija = []
for i in range(t):
	(x, y, z) = input().split(' ')
	(x, y, z) = (int(x), int(y), int(z))
	natija.append(uchtalik_sonlar_mumkinmi(x, y, z))
for i in range(t):
	if natija[i] == 'NO':
		print(natija[i])
	else:
		print(natija[i][0])
		print(' '.join(natija[i][1:]))


n = int(input())
(abc, ans) = ([], [])

def find(x, y, z, mas1, mas2):
	if x == y == z:
		mas1.append('YES')
		mas2.append([x, x, x])
	elif x == y and x > z:
		mas1.append('YES')
		mas2.append([z, z, y])
	else:
		mas1.append('NO')
for _ in range(n):
	(a, b, c) = sorted(list(map(int, input().split())), reverse=True)
	find(a, b, c, abc, ans)
for an in abc:
	if an == 'YES':
		print(an)
		print(' '.join(map(str, ans[0])))
		del ans[0]
	else:
		print(an)


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	a = list(map(int, input().split()))
	t = a[:]
	a = list(set(a))
	if len(a) == 1:
		print('YES')
		print(a[0], a[0], a[0])
	elif len(a) == 2:
		if t.count(max(a)) == 2:
			print('YES')
			a.sort()
			print(a[-1], a[0], a[0])
		else:
			print('NO')
	else:
		print('NO')


def sol(a, b, c):
	if max(a, b) == x and max(a, c) == y and (max(b, c) == z):
		return 1
	else:
		return 0
r = int(input())
for i in range(r):
	(x, y, z) = map(int, input().split())
	t = [x, y, z]
	if len(set(t)) == 2:
		if t.count(max(t)) == 1:
			print('NO')
			continue
		else:
			print('YES')
			print(min(t), min(t), max(t))
			continue
	a = x
	b = y
	c = z
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	a = x
	b = z
	c = y
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	a = y
	b = x
	c = z
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	a = y
	b = z
	c = x
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	a = z
	b = y
	c = x
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	a = z
	b = x
	c = y
	if sol(a, b, c):
		print('YES')
		print(a, b, c)
		continue
	print('NO')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	(a, b, c) = ([x, y], [x, z], [y, z])
	t_xyz = [0] * 3
	f = 0
	for i in a:
		for j in b:
			for h in c:
				if i >= j:
					t_xyz[0] = i
				else:
					t_xyz[0] = j
				if i >= h:
					t_xyz[1] = i
				else:
					t_xyz[1] = h
				if j >= h:
					t_xyz[2] = j
				else:
					t_xyz[2] = h
				if t_xyz == [x, y, z]:
					print('YES')
					print(i, j, h)
					f = 1
					break
			if f:
				break
		if f:
			break
	if not f:
		print('NO')


def solve(x, y, z):
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif x != y and x != z and (y != z):
		print('NO')
	else:
		array = [x, y, z]
		array.sort()
		if array[0] == array[1]:
			print('NO')
		else:
			print('YES')
			print(array[2], array[0], 1)
t = int(input())
for _ in range(t):
	(x, y, z) = [int(x) for x in input().split()]
	solve(x, y, z)


for i in range(int(input())):
	x = list(map(int, input().split()))
	if x.count(max(x)) < 2:
		print('NO')
	elif x.count(max(x)) == 3:
		print('YES')
		print(*x, sep=' ')
	else:
		print('YES')
		print(max(x), end=' ')
		print(min(x), end=' ')
		print(min(x))


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
for _ in range(int(input())):
	ls = ai()
	if len(set(ls)) == 1:
		print('Yes')
		print(*ls)
	elif len(set(ls)) == 3:
		print('No')
	else:
		maxx = max(ls)
		if ls.count(maxx) == 2:
			print('Yes')
			print(min(ls), min(ls), maxx)
		else:
			print('No')


n = int(input())
for i in range(n):
	ans = list()
	ab = input()
	a = 0
	b = 0
	c = 0
	l = ab.split(' ')
	for i in range(len(l)):
		l[i] = int(l[i])
	l.sort()
	if max(l) > l[1] and max(l) > l[0] or len(l) == len(set(l)):
		print('NO')
	else:
		print('YES')
		a = l[0]
		c = l[1]
		b = min([l[0], l[1]])
		print(a, b, c)


import math
import sys
from sys import *
from bisect import insort
import heapq
import collections
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, combinations_with_replacement
import random
import os
mod = 10 ** 9 + 7
MAX = sys.maxsize
MIN = -sys.maxsize - 1

def isPrime(n):
	if n > 1:
		for i in range(2, n):
			if n % i == 0:
				return False
		else:
			return True
	else:
		return False

def isPanagram(s):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	for char in alphabet:
		if char not in s.lower():
			return False
	return True

def isEqual(list1):
	if len(list1) < 0:
		res = True
	res = all((ele == list1[0] for ele in list1))
	if res:
		return True
	else:
		return False

def remove_duplicate(list1):
	final_list = []
	for i in list1:
		if i not in final_list:
			final_list.append(i)
	return final_list % mod

def solve():
	lis = list(map(int, input().split()))
	if isEqual(lis):
		print('YES')
		print(*lis)
	else:
		lis.sort()
		if lis[1] == lis[2]:
			print('YES')
			print(str(lis[2]) + ' ' + str(lis[0]) + ' ' + str(lis[0]))
		else:
			print('NO')
t = int(stdin.readline())
for i in range(t):
	result = solve()


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


t = int(input())
for _ in range(t):
	a = [int(s) for s in input().split()]
	if a.count(max(a)) < 2:
		print('NO')
	else:
		print('YES')
		print(max(a), min(a), min(a))


for test in range(0, int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	(a, b, c) = (0, 0, 0)
	ans = False
	if x == y and x == z:
		print('YES')
		a = b = c = x
		ans = True
	elif x == y and x > z:
		print('YES')
		a = x
		b = z
		c = 1
		ans = True
	elif x == z and x > y:
		print('YES')
		a = x
		b = y
		c = 1
		ans = True
	elif y == z and y > x:
		print('YES')
		a = y
		b = x
		c = 1
		ans = True
	else:
		print('NO')
	if ans == True:
		print(a, b, c)


t = int(input())
i = 1
while i <= t:
	w = input()
	p = w.split()
	x = int(p[0])
	y = int(p[1])
	z = int(p[2])
	if (x != y and x != z) and (y != x and y != z) and (z != x and z != y):
		print('NO')
	else:
		if x == y:
			match = x
			unmatch = z
		elif x == z:
			match = x
			unmatch = y
		elif y == z:
			match = y
			unmatch = x
		if match < unmatch:
			print('NO')
		else:
			a = 1
			b = x
			c = y
			if b == c:
				c = z
			print('YES')
			print(a, b, c)
	i += 1


import math
t = int(input())
for _ in range(t):
	a = [int(x) for x in input().split()]
	if len(set(a)) == 3:
		print('NO')
		continue
	elif len(set(a)) == 1:
		print('YES')
		print('{} {} {}'.format(a[0], a[0], a[0]))
	elif a[0] == a[1] and a[0] < a[2] or (a[1] == a[2] and a[1] < a[0]) or (a[0] == a[2] and a[0] < a[1]):
		print('NO')
	else:
		print('YES')
		tmp = list(set(a))
		print('{} {} {}'.format(1, tmp[0], tmp[1]))


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


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	d = [a, b, c]
	f = max(d)
	if len(set(d)) == 3:
		print('NO')
	elif d.count(f) == 1:
		print('NO')
	else:
		print('YES')
		if f == d[0] == d[1]:
			print(f, d[2], d[2])
		elif f == d[0] == d[2]:
			print(d[1], f, d[1])
		else:
			print(d[0], d[0], f)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	(a, b, c) = (0, 0, 0)
	if x == y and x > z:
		a = x
		b = z
		c = z
	elif x == z and x > y:
		b = z
		a = y
		c = y
	elif y == z and y > x:
		c = y
		b = x
		a = x
	elif x == y == z:
		(a, b, c) = (x, y, z)
	if not any((a, b, c)):
		print('NO')
	else:
		print('YES')
		print(a, b, c)


t = int(input())
for k in range(t):
	(a, b, c) = map(int, input().split())
	if a == b and a > c:
		print('YES')
		print(1, a, c)
	elif b == c and b > a:
		print('YES')
		print(1, b, a)
	elif a == c and a > b:
		print('YES')
		print(1, a, b)
	elif a == b == c:
		print('YES')
		print(a, a, a)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if (x == y or z == y or x == z) and sum([x, y, z]) == max([x, y, z]) * 2 + min([x, y, z]):
		print('YES')
		print(max([x, y, z]), min([x, y, z]), min([x, y, z]))
	else:
		print('NO')


import math
from collections import deque
from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	arr = [x, y, z, 1, 1]
	res = []
	can = False
	for i in range(5):
		for g in range(5):
			for c in range(5):
				if i == g or g == c or i == c:
					continue
				if x == max(arr[i], arr[g]) and y == max(arr[i], arr[c]) and (z == max(arr[g], arr[c])):
					can = True
					res = [arr[i], arr[g], arr[c]]
	if can:
		print('YES')
		print(*res)
	else:
		print('NO')


for _ in range(int(input())):
	l = sorted(list(map(int, input().split())), reverse=True)
	x = l[0]
	y = l[1]
	z = l[2]
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	elif x == y and y != z:
		if x > z:
			print('YES')
			print(x, z, 1)
			continue
		else:
			print('NO')
			continue
	else:
		print('NO')


__MULTITEST = True

def solve():
	x = list(map(int, input().split()))
	x.sort(reverse=True)
	if x.count(x[0]) == 2:
		print('YES')
		print(x[0], x[2], x[2])
	elif x.count(x[0]) == 3:
		print('YES')
		print(*x)
	else:
		print('NO')
t = int(input()) if __MULTITEST else 1
for tt in range(t):
	solve()


for _ in range(int(input())):
	x = list(map(int, input().split()))
	a = int()
	b = int()
	c = int()
	x.sort()
	flag = True
	n = len(set(x))
	if n == 1:
		a = x[0]
		b = x[0]
		c = x[0]
	elif n == 2:
		if x[1] == x[2]:
			a = x[1]
			b = x[0]
			c = x[0]
		else:
			flag = False
	else:
		flag = False
	if flag:
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))
	else:
		print('NO')


(x, y, z) = (0, 0, 0)
(us, us1, us2, us3) = (True, True, True, True)
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	us = x == y and y == z
	if us:
		print('YES')
		print(f'{x} {x} {x}')
	else:
		us1 = x < y and y == z
		us2 = y < x and x == z
		us3 = z < x and x == y
		if us1 or us2 or us3:
			print('YES')
			if x < y:
				print(f'{x} {x} {y}')
			elif y < x:
				print(f'{y} {x} {y}')
			else:
				print(f'{x} {z} {z}')
		else:
			print('NO')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == b == max(a, b, c) or b == c == max(a, b, c) or a == c == max(a, b, c):
		print('YES')
		print(max(a, b, c), 1, min(a, b, c))
	else:
		print('NO')


import math as mt

def tran(arr):
	s = []
	if len(set(arr)) == 3:
		s.append('NO')
	elif len(set(arr)) == 1:
		s.append('YES')
		s.append([arr[0], arr[0], arr[0]])
	else:
		p = min(arr)
		if arr.count(p) == 2:
			s.append('NO')
		else:
			s.append('YES')
			s.append([p, p, max(arr)])
	return s
t = int(input())
ans = []
for i in range(t):
	arr = list(map(int, input().rstrip().split()))
	r = tran(arr)
	ans.append(r)
for i in ans:
	if len(i) == 2:
		print('YES')
		print(*i[1])
	else:
		print('NO')


T = int(input())
for i in range(T):
	l1 = []
	l = list(map(int, input().split(' ')))
	x = l[0]
	y = l[1]
	z = l[2]
	d = len(list(set(l)))
	e = list(set(l))
	if d == 3:
		print('NO')
	elif d == 1:
		print('YES')
		print(x, y, z)
	elif d == 2:
		a = max(e)
		b = min(e)
		c = min(e) - 1
		if c == 0:
			c = 1
		elif a == 0:
			a = 1
		elif b == 0:
			b = 1
		l1.append(max(a, b))
		l1.append(max(a, c))
		l1.append(max(b, c))
		l.sort()
		l1.sort()
		if l == l1:
			print('YES')
			print(a, b, c)
		else:
			print('NO')


for _ in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	m = max(x, y, z)
	c = 0
	if x == m and y == m or (x == m and z == m) or (y == m and z == m):
		c = 2
	elif x == y and y == z and (z == x):
		c = 3
	if c == 2:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
	if c == 3:
		print('YES')
		print(x, y, z)
	if c == 0:
		print('NO')


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	a = list(map(int, stdin.readline().split()))
	a.sort(reverse=True)
	if a[0] != a[1]:
		print('NO')
		continue
	print('YES')
	print(a[0], a[-1], 1)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		(x, y, z) = LI()
		(p, q, r) = sorted([x, y, z])
		if q != r:
			ans.append([])
		elif x == p:
			ans.append([p, 1, q])
		elif y == p:
			ans.append([q, p, 1])
		else:
			ans.append([1, q, p])
	for x in ans:
		if len(x) == 0:
			print('NO')
		else:
			print('YES')
			print(x[0], x[1], x[2])
main()


for _ in range(int(input())):
	(x, y, z) = [int(i) for i in input().split()]
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y:
		a = x
		if x < z:
			print('NO')
			continue
		else:
			print('YES')
			print(x, z, z)
	elif x == z:
		if x < y:
			print('NO')
			continue
		else:
			print('YES')
			print(y, x, y)
	elif y == z:
		if y < x:
			print('NO')
			continue
		else:
			print('YES')
			print(x, x, y)
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
	elif x == y == z:
		print('YES')
		print(x, y, z)
	elif x == y == min(x, y, z) or y == z == min(x, y, z) or z == x == min(x, y, z):
		print('NO')
	else:
		print('YES')
		print(1, min(x, y, z), max(x, y, z))


for _ in range(int(input())):
	b = False
	(x, y, z) = map(int, input().split())
	s = set()
	while True:
		if x == y and y == z:
			(a, bu, c) = (x, x, x)
			b = True
		if b:
			break
		elif x == y:
			a = x
			if z < x:
				bu = z
				c = z
				b = True
		if b:
			break
		elif y == z:
			c = y
			if x < y:
				(a, bu) = (x, x)
				b = True
		if b:
			break
		elif x == z:
			bu = x
			if y < z:
				(a, c) = (y, y)
				b = True
		if b:
			break
		else:
			break
	if b:
		print('YES')
		print(a, bu, c)
	else:
		print('NO')


import math
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
SI = lambda : input()
II = lambda : int(input())
t = II()
for q in range(t):
	(x, y, z) = MI()
	m = max(x, y, z)
	if x == y == m or x == z == m:
		print('YES')
		print(m, min(x, y, z), min(x, y, z))
	elif y == z == m:
		print('YES')
		print(min(x, y, z), min(x, y, z), m)
	else:
		print('NO')


t = int(input())
cases = [[int(item) for item in input().split()] for i in range(t)]
for case in cases:
	x = case[0]
	y = case[1]
	z = case[2]
	if x == y == z:
		print('YES')
		print(f'{x} {y} {z}')
	elif x != y and y != z and (z != x):
		print('NO')
	elif x == y:
		if x < z:
			print('NO')
		else:
			print('YES')
			print(f'{x} {z} {1}')
	elif x == z:
		if x < y:
			print('NO')
		else:
			print('YES')
			print(f'{x} {y} {1}')
	elif y == z:
		if y < x:
			print('NO')
		else:
			print('YES')
			print(f'{y} {x} {1}')


def getIntList(lst):
	assert type(lst) is list
	rep = []
	for i in lst:
		rep.append(int(i))
	return rep
t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	lst = getIntList(input().split())
	lst.sort()
	if lst[1] == lst[2] and lst[0] <= lst[1]:
		print('YES')
		print('1 ' + str(lst[0]) + ' ' + str(lst[1]))
	else:
		print('NO')


for t in range(int(input())):
	l = list(map(int, input().split()))
	f = {}
	for i in l:
		if i in f:
			f[i] += 1
		else:
			f[i] = 1
	c1 = 0
	c2 = 0
	c3 = 0
	for i in f:
		if f[i] == 1:
			c1 += 1
		if f[i] == 2:
			c2 += 1
		if f[i] == 3:
			c3 += 1
	for i in f:
		if f[i] == 2:
			a = i
		if f[i] == 1:
			b = i
	if c3 == 1:
		print('YES')
		for i in l:
			print(i, end=' ')
		print()
	elif c1 == 3:
		print('NO')
	elif a > b:
		print('YES')
		print(b, b, a)
	else:
		print('NO')


t = int(input())
for case in range(t):
	X = [int(s) for s in input().split(' ')]
	if X.count(max(X)) == 1:
		print('NO')
	else:
		print('YES')
		print(min(X), min(X), max(X))


t = int(input())
d = []
for i in range(t):
	(x, y, z) = input().split()
	(x, y, z) = (int(x), int(y), int(z))
	if x == y and y == z:
		a = x
		b = x
		c = x
		d.append('YES')
		d.append(str(a) + ' ' + str(b) + ' ' + str(c))
	elif x == y:
		if z <= x:
			a = x
			b = z
			c = z
			d.append('YES')
			d.append(str(a) + ' ' + str(b) + ' ' + str(c))
		else:
			d.append('NO')
	elif y == z:
		if x <= y:
			a = y
			b = x
			c = x
			d.append('YES')
			d.append(str(a) + ' ' + str(b) + ' ' + str(c))
		else:
			d.append('NO')
	elif z == x:
		if y <= x:
			a = x
			b = y
			c = y
			d.append('YES')
			d.append(str(a) + ' ' + str(b) + ' ' + str(c))
		else:
			d.append('NO')
	else:
		d.append('NO')
for k in d:
	print(k)


t = int(input())
while t:
	(x, y, z) = [int(x) for x in input().split()]
	if x == y == z:
		print('YES')
		print(x, '', x, '', x, sep=' ')
	elif x == y:
		if y > z:
			print('YES')
			print(x, '', z, '', '1', sep=' ')
		else:
			print('NO')
	elif y == z:
		if y > x:
			print('YES')
			print(y, '', x, '', '1', sep=' ')
		else:
			print('NO')
	elif x == z:
		if x > y:
			print('YES')
			print(x, '', y, '', '1', sep=' ')
		else:
			print('NO')
	else:
		print('NO')
	t -= 1


for _ in range(0, int(input())):
	a = list(map(int, input().split()))
	a.sort()
	a.reverse()
	if a[0] != a[1]:
		print('NO')
	elif len(set(a)) == 1:
		print('YES')
		print(a[0], ' ', a[0], ' ', a[0])
	else:
		print('YES')
		aa = 1
		if a[2] == 1:
			aa = 1
		else:
			aa = a[2] - 1
		print(a[0], ' ', a[2], ' ', aa)


def lp():
	return list(map(int, input().split()))

def ip():
	return int(input())
t = int(input())
while t:
	t -= 1
	lst = lp()
	lst.sort()
	x = lst[0]
	y = lst[1]
	z = lst[2]
	a = 1
	b = x
	c = y
	if z == max(b, c):
		print('YES')
		print(a, b, c)
	else:
		print('NO')


def solve(x, y, z):
	(a, b, c) = (0, 0, 0)
	if x == y:
		a = x
		if z <= a:
			b = z
			c = 1
	elif y == z:
		c = y
		if x <= c:
			a = x
			b = 1
	elif x == z:
		b = x
		if y <= b:
			c = y
			a = 1
	if a == 0 or b == 0 or c == 0:
		print('NO')
	else:
		print('YES')
		print(a, b, c)
t = int(input())
for i in range(t):
	(x, y, z) = [int(j) for j in input().split()]
	solve(x, y, z)


def val(x, y, z):
	if x != y and y != z and (x != z):
		return ['NO']
	elif x == y and y == z:
		return ['YES', (x, x, x)]
	elif x == y and y != z:
		if x < z:
			return ['NO']
		elif x > z:
			return ['YES', (x, z, z)]
	elif y == z and x != y:
		if y < x:
			return ['NO']
		else:
			return ['YES', (x, x, y)]
	elif z == x and x != y:
		if x < y:
			return ['NO']
		else:
			return ['YES', (y, x, y)]
for i in range(int(input())):
	(x, y, z) = (int(_x) for _x in input().split())
	t = val(x, y, z)
	if t[0] == 'NO':
		print(t[0])
	else:
		print(t[0])
		for i in range(len(t[1]) - 1):
			print(t[1][i], end=' ')
		print(t[1][2])


def fun(a, b, c):
	if c > b:
		ls.append('NO')
	else:
		ls.append('YES')
		ls.append(str(a) + ' ' + str(c) + ' ' + '1')
ls = []
t = int(input())
for i in range(t):
	s = list(map(int, input().rstrip().split()))
	if s[0] == s[1] == s[2]:
		ls.append('YES')
		ls.append(str(s[0]) + ' ' + str(s[0]) + ' ' + str(s[0]))
	elif s[0] == s[1] and s[1] != s[2]:
		fun(s[0], s[1], s[2])
	elif s[0] == s[2] and s[1] != s[2]:
		fun(s[0], s[2], s[1])
	elif s[1] == s[2] and s[1] != s[0]:
		fun(s[1], s[2], s[0])
	else:
		ls.append('NO')
for i in ls:
	print(i)


t = int(input())
while t:
	a = [int(x) for x in input().split()]
	m = max(a)
	d = []
	if a.count(m) >= 2:
		print('YES')
		for i in range(len(a)):
			if a[i] == m:
				d.append(i)
			if len(d) == 2:
				break
		print(m, end=' ')
		for i in range(3):
			if i not in d:
				print(a[i], end=' ')
				mini = a[i]
				break
		print(mini)
	else:
		print('NO')
	t -= 1


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


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

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

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.add(i)
	if n > 1:
		factors.add(n)
	print(factors)
	if len(factors) == 2:
		return True
	else:
		return False

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def Sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return lst

def minimum_integer_not_in_list(a):
	b = max(a)
	if b < 1:
		return 1
	A = set(a)
	B = set(range(1, b + 1))
	D = B - A
	if len(D) == 0:
		return b + 1
	else:
		return min(D)

def solution():
	for i in range(Int()):
		a = List()
		m = max(a)
		c = 0
		for i in range(len(a)):
			if a[i] == m:
				c += 1
		if c >= 2:
			print('YES')
			print(max(a), min(a), min(a))
		else:
			print('NO')
solution()


from __future__ import division, print_function
import itertools, os, sys, threading
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect
from random import randrange
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))

def main():
	for _ in range(int(input())):
		(x, y, z) = read()
		(m, n, o) = sorted([x, y, z], reverse=True)
		if m != n:
			print('NO')
			continue
		print('YES')
		if x == y and y == z:
			print(x, y, z)
		else:
			print(*[m] + [o] * 2)
main()


for _ in range(int(input())):
	l = list(map(int, input().split()))
	maxi = max(l)
	if l.count(maxi) == 1:
		print('NO')
	elif l.count(maxi) == 3:
		print('YES')
		print(f'{maxi} {maxi} {maxi}')
	else:
		print('YES')
		for i in l:
			if i != maxi:
				n = i
		if min(l) == 1:
			print(f'{maxi} 1 1')
		else:
			print(f'{maxi} {n} {n - 1}')


t = int(input())
for t1 in range(t):
	a = [int(n1) for n1 in input().split()]
	a = sorted(a)
	if a[-1] == a[-2]:
		print('YES')
		print(a[-1], end=' ')
		print(1, end=' ')
		print(a[0])
	else:
		print('NO')


test = int(input())
for i in range(test):
	(x, y, z) = [int(i) for i in input().split()]
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif z == x and y < x:
		print('YES')
		print(y, x, max(1, y - 1))
	elif y == z and x < y:
		print('YES')
		print(x, max(1, x - 1), y)
	elif x == y and z < y:
		print('YES')
		print(x, z, max(1, z - 1))
	else:
		print('NO')


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	else:
		maxV = max(x, y, z)
		minV = min(x, y, z)
		if maxV == x and maxV == y:
			print('YES')
			print(maxV, minV, minV)
		elif maxV == x and maxV == z:
			print('YES')
			print(maxV, minV, minV)
		elif maxV == y and maxV == z:
			print('YES')
			print(maxV, minV, minV)
		else:
			print('NO')


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	if m == x and m == y or (m == y and m == z) or (m == x and m == z):
		print('YES')
		print(m, min(x, y, z), 1, sep=' ')
	else:
		print('NO')


res = []
for t in range(int(input())):
	xyz = list(map(int, input().split()))
	(x, y, z) = xyz
	if xyz.count(max(xyz)) >= 2:
		if x == z:
			a = y
			b = z
			c = 1
		if y == z:
			a = x
			b = 1
			c = z
		if x == y:
			a = 1
			b = z
			c = y
		if x == y == z:
			(a, b, c) = [x] * 3
	else:
		res.append(['NO'])
		continue
	res.append(['Yes'])
	res.append([a, b, c])
for n in res:
	print(*n)


test = int(input())
for t in range(test):
	a = input().split()
	a.sort(key=int, reverse=True)
	if a[0] == a[1] and int(a[0]) >= int(a[2]):
		print('yes')
		print(a[0], end=' ')
		print(a[2], end=' ')
		print(a[2])
	else:
		print('no')


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	s = set(l)
	if len(s) == 3:
		print('NO')
		continue
	if len(s) == 1:
		print('YES')
		print(' '.join([str(x)] * 3))
	elif l.count(max(s)) == 2:
		print('YES')
		print(max(s), min(s), min(s))
	else:
		print('NO')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
for _ in range(stdint()):
	s = list(stdarr())
	s = sorted(s)
	if s[1] != s[2]:
		print('NO')
	else:
		print('YES')
		print(max(s), min(s), min(s))


def Determine(Input):
	List = Input.split(' ')
	for i in range(len(List)):
		List[i] = int(List[i])
	List.sort()
	if List[2] == List[1] and int(List[0]) > 0:
		print('YES')
		print(str(List[2]) + ' ' + str(List[0]) + ' ' + str(List[0]))
	else:
		print('NO')
trials = int(input(''))
for i in range(trials):
	Input = input('')
	Determine(Input)


from sys import stdin, stdout
import math
input = stdin.readline

def solve():
	(x, y, z) = map(int, input().split())
	if x == y or y == z or z == x:
		if x == y and x < z or (y == z and y < x) or (x == z and x < y):
			print('NO')
			return
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
	else:
		print('NO')
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


for _ in range(int(input())):
	lst = [int(x) for x in input().split()]
	lt = sorted(lst)
	if len(list(set(lst))) == 1:
		print('YES')
		print(lst[0], lst[1], lst[2])
	elif len(list(set(lst))) == 3:
		print('NO')
	elif lt[0] == lt[1]:
		print('NO')
	else:
		print('YES')
		(x, y, z) = (lst[0], lst[1], lst[2])
		if x == z:
			print(min(x, y, z), max(x, y, z), min(x, y, z))
		if x == y:
			print(max(x, y, z), min(x, y, z), min(x, y, z))
		if y == z:
			print(min(x, y, z), min(x, y, z), max(x, y, z))


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
mod = 1000000007
res = ['YES', 'NO']
test = 1
test_case = ii()
while test <= test_case:
	test += 1
	a = li()
	a.sort()
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		if a[0] != a[1]:
			a[1] = a[0]
		print(*a)


def islucky(n):
	while n > 0:
		if n % 10 != 4 and n % 10 != 7:
			return False
		n //= 10
	return True

def main():
	t = int(input())
	while t:
		(x, y, z) = sorted(map(int, input().split()))
		if y == z:
			print('YES')
			print(x, x, z)
		else:
			print('NO')
		t -= 1
	return
main()


try:
	for _ in range(int(input())):
		l = [int(i) for i in input().split()]
		mx = max(l)
		mn = min(l)
		x = l.count(mx)
		if x <= 1:
			print('NO')
		elif x == 2:
			print('YES')
			print(mx, mn, mn)
		elif x == 3:
			print('YES')
			print(mx, mx, mx)
except:
	pass


n = int(input())
for i in range(n):
	ele = input()
	ele = ele.split(' ')
	(x, y, z) = [int(i) for i in ele]
	if x != y and y != z and (z != x):
		print('NO')
		continue
	if x == y and y == z:
		print('YES')
		print(x, y, z)
		continue
	if (x == z and y != z) and y > z:
		print('NO')
		continue
	elif (x == z and y != z) and y < z:
		print('YES')
		print(y, y, x)
		continue
	if (x == y and y != z) and z > y:
		print('NO')
		continue
	elif (x == y and y != z) and z < y:
		print('YES')
		print(z, z, y)
		continue
	if (y == z and x != z) and x > z:
		print('NO')
		continue
	elif (y == z and x != z) and x < z:
		print('YES')
		print(x, y, x)
		continue


t = int(input())
for _ in range(t):
	suit = [int(i) for i in input().split(' ')]
	suit.sort()
	if suit[1] != suit[2]:
		print('NO')
	else:
		print('YES')
		print('{0} {1} {2}'.format(suit[0], suit[0], suit[2]))


for _ in range(int(input())):
	(x, y, z) = [int(i) for i in input().split()]
	ans = [min(x, y), min(x, z), min(y, z)]
	if max(ans[0], ans[1]) == x and max(ans[1], ans[2]) == z and (max(ans[0], ans[2]) == y):
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
for z in range(t):
	a = sorted([int(q) for q in input().split()], reverse=True)
	s = set(a)
	if len(s) < 3:
		if len(s) == 1:
			print('YES')
			print(a[0], a[0], a[0])
		elif a[0] == a[1]:
			print('YES')
			print(a[0], a[2], a[2])
		else:
			print('NO')
	else:
		print('NO')


from math import log2, ceil, floor
for t in range(int(input())):
	a = list(map(int, input().split()))
	a = sorted(a)
	if a[0] == 1:
		if a[1] != a[2]:
			print('NO')
		else:
			print('YES')
			print(1, 1, a[1])
	elif a[0] == a[1] and a[1] == a[2]:
		print('YES')
		print(a[0], a[1], a[2])
	elif a[0] != a[1] and a[1] != a[2] and (a[0] != a[2]):
		print('NO')
	elif a[0] == a[1] and a[1] != a[2]:
		print('NO')
	elif a[0] != a[1] and a[1] == a[2]:
		print('YES')
		print(a[1], a[0], a[0] - 1)


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	m = max(l)
	if l.count(m) == 3:
		print('YES')
		print(m, m, m)
	elif l.count(m) == 2:
		print('YES')
		n = min(l)
		print(m, n, n)
	else:
		print('NO')


n = int(input())
for i in range(n):
	(x, y, z) = list(map(int, input().split()))
	if x > y and x > z or (y > z and y > x) or (z > y and z > x):
		print('No')
	elif x == y == z:
		print('Yes')
		print(x, y, z)
	elif x == y and x > z:
		print('Yes')
		print(1, y, z)
	elif y == z and y > x:
		print('Yes')
		print(x, 1, z)
	else:
		print('yes')
		print(x, y, 1)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if len(set([x, y, z])) == 3:
		print('NO')
	else:
		w = max(x, y, z)
		if x == y == w or y == z == w or z == x == w:
			print('YES')
			print(w, min(x, y, z), min(x, y, z))
		else:
			print('NO')


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from collections import defaultdict as dd, deque, Counter

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

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
mod = int(1000000000.0) + 7
for t in range(int(data())):
	(x, y, z) = mdata()
	m = max(x, y, z)
	if x == m and y == m:
		out('YES')
		print(x, z, z)
	elif y == m and z == m:
		out('YES')
		print(x, x, z)
	elif x == m and z == m:
		out('YES')
		print(y, y, z)
	else:
		out('NO')


t = int(input())
for i in range(t):
	a = [int(i) for i in input().strip().split()]
	mx = max(a[0], max(a[1], a[2]))
	mn = min(a[0], min(a[1], a[2]))
	if a.count(mx) < 2:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)


t = int(input())
for T in range(t):
	l = [int(x) for x in input().split()]
	l.sort()
	if l[-1] != l[-2]:
		print('NO')
		continue
	print('YES')
	print(l[0], l[0], l[-1])


def sol():
	l = list(map(int, input().split()))
	x = sorted(l)
	if x[1] == x[2]:
		print('YES')
		print(x[2], x[0], x[0])
	else:
		print('NO')
try:
	for _ in range(int(input())):
		sol()
except:
	pass


import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

def main():
	n = int(input())
	arr = []
	for _ in range(n):
		arr.append(list(map(int, input().split(' '))))
	for i in range(n):
		(x, y, z) = arr[i]
		ma = max(arr[i])
		mi = min(arr[i])
		if ma == mi:
			print('YES')
			print(f'{ma} {ma} {ma}')
		elif arr[i].count(ma) == 2:
			print('YES')
			print(f'{mi} {mi} {ma}')
		else:
			print('NO')
main()


def solve(x, y, z):
	for a in [x, y]:
		for b in [x, z]:
			for c in [y, z]:
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					return (a, b, c)
for _ in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	s = solve(x, y, z)
	if s:
		print('YES')
		print(*s)
	else:
		print('NO')


def f():
	t = int(input())
	arr = []
	for _ in range(t):
		(x, y, z) = list(map(int, input().split(' ')))
		arr.append((x, y, z))
	for (x, y, z) in arr:
		(sx, sy, sz) = sorted([x, y, z])
		if sx <= sy and sy < sz:
			print('NO')
			continue
		print('YES')
		if x == y == z:
			print(f'{x} {y} {z}')
		elif x == y or y == z:
			print(f'{x} 1 {z}')
		elif x == z:
			print(f'{x} {y} 1')
f()


t = int(input())
for t1 in range(0, t):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	m1 = min(x, y, z)
	f = 1
	if x == y and x >= z:
		print('YES')
		print(m, m1, m1)
	elif x == z and x >= y:
		print('YES')
		print(m1, m, m1)
	elif y == z and y >= x:
		print('YES')
		print(m1, m1, m)
	else:
		print('NO')


def check(x, y, z):
	if x == y and y == z:
		return [x, y, z]
	elif x == y and x > z and (y > z):
		if z - 1 < 0:
			return []
		else:
			return [x, z, z]
	elif x == z and x > y and (z > y):
		if y - 1 < 0:
			return []
		else:
			return [y, x, y]
	elif y == z and y > x and (z > x):
		if x - 1 < 0:
			return []
		else:
			return [x, x, y]
ans = []
amount = int(input())
for i in range(amount):
	(x, y, z) = list(map(int, input().split()))
	ans.append(check(x, y, z))
for i in ans:
	if i == None:
		print('NO')
	else:
		print('YES')
		print(i[0], i[1], i[2])


def main():
	l = list(map(int, input().split()))
	a = max(l)
	b = min(l)
	c = b
	count = 0
	for i in l:
		if i == a:
			count += 1
	if count < 2:
		print('No')
	else:
		print('Yes')
		print(a, b, c, end=' ')
t = int(input())
for i in range(t):
	main()


for i in range(int(input())):
	l = [int(i) for i in input().split()]
	if len(set(l)) == 3:
		print('NO')
	else:
		a = min(l)
		if l.count(a) == 2:
			print('NO')
		else:
			print('YES')
			print(min(l), min(l), max(l))


import sys
t = int(input())
while t:
	s = list(map(int, sys.stdin.readline().split()))
	(x, y, z) = (s[0], s[1], s[2])
	if x == y == z:
		print('YES')
		print(' '.join(list(map(str, s))))
		t -= 1
		continue
	elif max(x, y) == z:
		print('YES')
		m = min(x, y)
		print('1 ' + str(m) + ' ' + str(z))
	elif max(x, z) == y:
		print('YES')
		m = min(x, z)
		print('1 ' + str(m) + ' ' + str(y))
	else:
		print('NO')
	t -= 1


ans = []
for _ in range(int(input())):
	xyz = sorted([*map(int, input().split())])
	x = xyz[0]
	z = xyz[2]
	if xyz.count(z) > 1:
		ans.extend(['YES', '%d %d %d' % (x, x, z)])
	else:
		ans.append('NO')
print('\n'.join(ans))


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


from itertools import permutations
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	l = list(set([x, y, z]))
	flag = 0
	if len(l) == 1:
		print('YES')
		print(x, y, z)
		flag = 1
	else:
		for X in range(3 - len(l)):
			l.append(1)
		perm = list(permutations(l))
		for i in perm:
			flag = 0
			a = i[0]
			b = i[1]
			c = i[2]
			if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
				print('YES')
				print(i[0], i[1], i[2])
				flag = 1
				break
		if flag == 0:
			print('NO')


testcase = int(input())
for i in range(testcase):
	numlist = [int(j) for j in input().split()]
	numlist.sort()
	if numlist.count(numlist[2]) == 2:
		print('YES')
		if numlist[0] == 1:
			print(numlist[0], numlist[0], numlist[2])
		else:
			print(numlist[0] - 1, numlist[0], numlist[2])
	elif numlist.count(numlist[2]) == 3:
		print('YES')
		print(numlist[2], numlist[2], numlist[2])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if not (max(x, y) == max(y, z) and max(y, z) == max(x, z)):
		print('NO')
	else:
		print('YES')
		print(str(max(x, y, z)) + ' ' + str(min(x, y, z)) + ' ' + str(min(x, y, z)))


t = int(input())
for _ in range(t):
	nums = [int(i) for i in input().split(' ')]
	nums.sort()
	if nums[0] != nums[1] and nums[1] != nums[2] and (nums[2] != nums[0]):
		print('NO')
	elif nums[0] == nums[1] and nums[1] != nums[2]:
		print('NO')
	elif nums[1] == nums[2]:
		print('YES')
		print(nums[0], nums[0], nums[1])


from sys import stdin, stdout

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
for _ in range(ii()):
	(x, y, z) = mi()
	max1 = max(max(x, y), z)
	if x == y and max1 == x:
		print('YES')
		print(x, z, z)
	elif y == z and max1 == y:
		print('YES')
		print(y, x, x)
	elif x == z and max1 == x:
		print('YES')
		print(x, y, y)
	else:
		print('NO')


a = int(input())
for i in range(a):
	(t1, t2, t3) = map(int, input().split())
	if t1 == t2 and t1 >= t3:
		print('YES')
		print(t1, t3, t3)
	elif t1 <= t2 and t2 == t3:
		print('YES')
		print(t2, t1, t1)
	elif t1 == t3 and t1 >= t2:
		print('YES')
		print(t1, t2, t2)
	elif t2 == t3 and t2 >= t1:
		print('YES')
		print(t2, t1, t1)
	else:
		print('NO')


for i in range(int(input())):
	lst = []
	lst12 = []
	lst1 = list(map(int, input().split()))
	a = min(lst1[0], lst1[1])
	b = min(lst1[0], lst1[2])
	c = min(lst1[2], lst1[1])
	lst.append(max(a, b))
	lst.append(max(a, c))
	lst.append(max(b, c))
	lst.sort()
	lst1.sort()
	lst12.append(a)
	lst12.append(b)
	lst12.append(c)
	lst12.sort()
	if lst1 == lst:
		print('YES')
		print(*lst12)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = list(map(int, input().split()))
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	else:
		lis = [x, y, z]
		lis.sort()
		if lis[-1] == lis[-2]:
			print('YES')
			print(lis[-1], lis[0], lis[0])
		else:
			print('NO')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	if arr[0] != arr[1] and arr[0] != arr[2] and (arr[1] != arr[2]):
		print('NO')
	elif arr.count(arr[0]) == 3:
		print('YES')
		print(*arr, sep=' ')
	elif arr.count(max(arr)) != 2:
		print('NO')
	else:
		print('YES')
		a = max(arr)
		b = min(arr)
		print(a, b, 1)


for i in range(int(input())):
	l = list(map(int, input().split()))
	m = max(l)
	ct = 0
	for chr in l:
		if chr == m:
			ct += 1
	if ct >= 2:
		print('YES')
		if ct == 3:
			print(' '.join(map(str, l)))
		else:
			p = []
			for chr in l:
				if chr not in p:
					p.append(chr)
			print(' '.join(map(str, p)), '1')
	else:
		print('NO')


def f(x, y, z):
	a = x
	if y < x:
		return False
	if y == x:
		if x < z:
			return False
		else:
			(c, b) = (z, z)
			return (True, a, b, c)
	if y > x:
		c = y
		if y == z:
			b = 1
			return (True, a, b, c)
		if y > z:
			return False
		if y < z:
			if x >= z:
				b = z
				return (True, a, b, c)
			else:
				return False
for t in range(int(input())):
	(x, y, z) = map(int, input().strip().split())
	if f(x, y, z) == False:
		if f(x, z, y) == False:
			print('NO')
		else:
			(s, m, l, p) = f(x, z, y)
			print('YES')
			print(m, l, p)
	else:
		print('YES')
		(s, m, l, p) = f(x, y, z)
		print(m, l, p)


def check(a, b, c):
	global x, y, z
	return x == max(a, b) and y == max(a, c) and (z == max(b, c))
for _ in range(int(input())):
	s = list(map(int, input().split()))
	s.sort()
	if s[1] != s[2]:
		print('NO')
	else:
		print('YES')
		print(s[0], s[0], s[2])


t = int(input())
for l in range(t):
	a = list(map(int, input().split(' ')))
	x = a[0]
	y = a[1]
	z = a[2]
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	b = list(set(a))
	if len(b) == 3:
		print('NO')
	if len(b) == 2:
		if a.count(max(b)) == 1:
			print('NO')
		else:
			print('YES')
			mi = min(b)
			ma = max(b)
			print(ma, mi, mi)


test = int(input())
for i in range(test):
	arr = list(map(int, input().split()))
	arr.sort()
	if arr[1] != arr[2]:
		print('NO')
	else:
		print('YES')
		print(arr[0], arr[0], arr[1], sep=' ')


for i in range(int(input())):
	a = [int(x) for x in input().split()]
	if len(set(a)) == 3:
		print('NO')
	else:
		t = sorted(a)
		if t[0] == t[1] and t[1] != t[2]:
			print('NO')
		else:
			print('YES')
			print(t[0], t[1], 1)


def solve():
	nums = list(map(int, input().split()))
	nums.sort()
	(x, y, z) = (nums[0], nums[1], nums[2])
	if y != z:
		print('NO')
	else:
		print('YES')
		print(x, x, z)
	return 0

def main():
	t = int(input())
	for _ in range(t):
		solve()
	return 0
main()


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	max1 = max(x, y, z)
	if [x, y, z].count(max1) == 1:
		print('NO')
		continue
	max2 = min(x, y, z)
	print('YES')
	print(max1, max2, max2)


def maximums(x, y, z):
	if x == y == z:
		print('YES')
		print(x, y, z)
		return
	if x != y and y != z and (z != x):
		print('NO')
		return
	a = b = c = 0
	if x == y:
		a = x
		if z > x:
			print('NO')
			return
		print('YES')
		print(a, z, z)
	if y == z:
		c = y
		if x > y:
			print('NO')
			return
		print('YES')
		print(c, x, x)
	if z == x:
		b = z
		if y > z:
			print('NO')
			return
		print('YES')
		print(b, y, y)
t = int(input())
for i in range(t):
	(x, y, z) = list(map(int, input().split()))
	maximums(x, y, z)


def check(x, y, z, a, b, c):
	if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
		return True
	else:
		return False
for _ in range(int(input())):
	(x, y, z) = map(int, input().strip().split(' '))
	aa = [x, y]
	bb = [x, z]
	cc = [y, z]
	(a, b, c) = (x, x, y)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (x, z, y)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (x, x, z)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (x, z, z)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (y, x, y)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (y, z, y)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (y, x, z)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	(a, b, c) = (y, z, z)
	if check(x, y, z, a, b, c):
		print('YES')
		print(a, b, c)
		continue
	else:
		print('NO')


def success(x, y, z):
	print('YES')
	print(x, y, z)

def solve(x, y, z):
	if x == y and y >= z:
		success(z, z, x)
		return
	if x == y and y == z:
		print('YES')
		print(x, x, x)
		return
	if y == z and z >= x:
		success(y, x, x)
		return
	if x == z and z >= y:
		success(x, y, y)
		return
	if y == z and z >= x:
		success(y, x, x)
		return
	print('NO')
	return
for _ in range(int(input().strip())):
	(x, y, z) = [int(x) for x in input().strip().split(' ')]
	solve(x, y, z)


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x != y and y != z and (x != z):
		print('NO')
	elif x == y and x < z or (y == z and y < x) or (x == z and x < y):
		print('NO')
	else:
		print('YES')
		if x == y:
			print(x, z, z)
		elif y == z:
			print(y, x, x)
		else:
			print(z, y, y)


import sys
T = int(sys.stdin.readline())
for i in range(T):
	(x, y, z) = map(int, sys.stdin.readline().split())
	a = min(x, y)
	b = min(x, z)
	c = min(y, z)
	if x not in [a, b, c]:
		print('NO')
	elif y not in [a, b, c]:
		print('NO')
	elif z not in [a, b, c]:
		print('NO')
	else:
		print('YES')
		print(' '.join([str(x) for x in [a, b, c]]))


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if [x, y, z].count(max([x, y, z])) > 1:
		print('YES')
		nos = list(set([x, y, z]))
		if len(nos) == 1:
			print(nos[0], nos[0], nos[0])
		else:
			print(nos[0], nos[1], 1)
	else:
		print('NO')


T = int(input())
for _ in range(T):
	li = list(map(int, input().split()))
	maxi = max(li)
	mini = min(li)
	if li.count(maxi) >= 2:
		print('YES')
		print(maxi, mini, mini)
	else:
		print('NO')


for i in range(int(input())):
	line = input().split()
	x = int(line[0])
	y = int(line[1])
	z = int(line[2])
	if x != y and y != z and (z != x):
		print('NO')
	elif x == y:
		if x < z:
			print('NO')
		else:
			print('YES')
			print(x, z, z)
	elif x == z:
		if x < y:
			print('NO')
		else:
			print('YES')
			print(y, x, y)
	elif y < x:
		print('NO')
	else:
		print('YES')
		print(x, x, y)


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_a(tp):
	return list(r_t(tp))

def main():
	cases = int(r())
	for case in range(cases):
		A = list(r_t(int))
		A.sort(reverse=True)
		if A[0] == A[1] and (A[0] > A[2] or A[0] == A[2]):
			print('YES')
			if A[0] == A[1] and A[1] == A[2]:
				print(A[0], A[0], A[0])
			else:
				print(A[0], A[2], max(1, A[2] - 1))
		else:
			print('NO')
main()


for _ in range(int(input())):
	lis = list(map(int, input().split()))
	a = max(lis)
	c = 0
	for i in lis:
		if i == a:
			c += 1
	if c == 3:
		print('YES')
		print(a, a, a)
	elif c == 2:
		print('YES')
		print(a, min(lis), min(lis))
	else:
		print('NO')


n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	a = max(l)
	b = min(l)
	count = 0
	for i in range(3):
		if a == l[i]:
			count += 1
	if count < 2:
		print('NO')
	else:
		print('YES')
		print(a, b, b)


t = int(input())
while t:
	t -= 1
	arr = [int(x) for x in input().split()]
	arr.sort(reverse=True)
	if arr[0] == arr[1]:
		print('YES')
		res = [arr[0], arr[2], arr[2]]
		print(*res)
	else:
		print('NO')


n = int(input())
for _ in range(n):
	a = list(map(int, input().split()))
	if len(list(set(a))) == 1:
		print('YES')
		print(a[0], a[1], a[2])
	else:
		m = max(a)
		mi = min(a)
		c = a.count(m)
		if c >= 2:
			print('YES')
			print(m, mi, mi)
		else:
			print('NO')


for x in range(int(input())):
	a = list(map(int, input().split()))
	if len(set(a)) == 1:
		print('YES')
		print(*a)
	elif len(set(a)) == 3:
		print('NO')
	elif a.count(min(a)) == 2:
		print('NO')
	else:
		if min(a) == a[0]:
			print('YES')
			print(a[1], a[0], a[0])
		if min(a) == a[1]:
			print('YES')
			print(a[1], a[0], a[1])
		if min(a) == a[2]:
			print('YES')
			print(a[2], a[2], a[0])


test = int(input())
result = []
for t in range(test):
	tri = [int(num) for num in input().split()]
	tri.sort()
	if tri[1] != tri[2]:
		result.append('NO')
	elif tri[1] < tri[0]:
		result.append('NO')
	elif tri[0] == tri[1] and tri[1] == tri[2]:
		result.append('YES')
		x = str(tri[0])
		result.append(x + ' ' + x + ' ' + x)
	else:
		result.append('YES')
		result.append(str(tri[1]) + ' ' + str(tri[0]) + ' ' + str(tri[0]))
for count in range(len(result)):
	print(result[count])


for i in range(int(input())):
	l = list(map(int, input().split()))
	l = sorted(l)
	if len(set(l)) == 1:
		print('YES')
		print(l[0], l[0], l[0])
	elif l[2] == l[1] and l[2] > l[0]:
		print('YES')
		print(l[2], l[0], 1)
	else:
		print('NO')


a = int(input())
j = 1
while j <= a:
	c = [int(i) for i in input().split(' ')]
	if c[0] == c[1] >= c[2]:
		print('YES')
		p = c[0]
		q = c[2]
		print(f'{c[2]} {c[2]} {c[0]}')
	elif c[0] == c[2] >= c[1]:
		print('YES')
		print(f'{c[1]} {c[1]} {c[2]}')
	elif c[1] == c[2] >= c[0]:
		print('YES')
		print(f'{c[0]} {c[0]} {c[1]}')
	else:
		print('NO')
	j += 1


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	mx = max(l)
	mn = min(l)
	if l.count(mx) == 1:
		print('NO')
		continue
	print('YES')
	if x == y and y == z:
		print(mx, mx, mx)
	else:
		print(mx, mn, mn)


from collections import Counter
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	c = Counter([x, y, z])
	mx = max(c)
	mn = min(c)
	if len(c) == 3:
		print('NO')
	elif c[mx] < 2:
		print('NO')
	else:
		print('YES')
		print(mn, mn, mx)


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	s = set([x, y, z])
	if len(s) == 3:
		print('NO')
		continue
	if x == y == z:
		print('YES')
		print(x, y, z)
		continue
	a = b = c = -1
	if x == y:
		if x < z:
			print('NO')
			continue
		a = x
		c = b = z
	elif x == z:
		if x < y:
			print('NO')
			continue
		b = x
		a = c = y
	else:
		if z < x:
			print('NO')
			continue
		b = a = x
		c = z
	print('YES')
	print(a, b, c)


n = int(input())
for _ in range(n):
	a = list(map(int, input().split()))
	if len(set(a)) == 3 or a.count(max(a)) == 1:
		print('NO')
	else:
		print('YES')
		print(min(a), min(a), max(a))


from sys import stdin
nii = lambda : map(int, stdin.readline().split())
lnii = lambda : list(map(int, stdin.readline().split()))
t = int(input())
for i in range(t):
	l = sorted(lnii())
	if l[0] <= l[1] and l[1] == l[2]:
		print('YES')
		print(l[2], l[0], l[0])
	else:
		print('NO')


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []
for _ in range(testCases):
	(x, y, z) = input_split()
	found = True
	if x == y and y > z:
		a = x
		b = z
		c = 1
	elif x == z and x > y:
		b = x
		a = y
		c = 1
	elif y == z and y > x:
		c = y
		a = x
		b = 1
	elif x == y == z:
		a = x
		b = x
		c = x
	else:
		found = False
		ans = 'NO'
	if found:
		ans = 'YES\n{} {} {}'.format(a, b, c)
	answers.append(ans)
print(*answers, sep='\n')


t = int(input())
while t:
	t -= 1
	(x, y, z) = [int(x) for x in input().split()]
	arrA = [x, y]
	arrB = [x, z]
	arrC = [y, z]
	a1 = -1
	b1 = -1
	c1 = -1
	for a in arrA:
		for b in arrB:
			for c in arrC:
				if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
					a1 = a
					b1 = b
					c1 = c
	if a1 != -1:
		print('YES')
		print(a1, b1, c1)
	else:
		print('No')


t = int(input())
while t > 0:
	t -= 1
	(x, y, z) = map(int, input().split())
	temp = max(x, y, z)
	cnt = 0
	if x == temp:
		cnt += 1
	if y == temp:
		cnt += 1
	if z == temp:
		cnt += 1
	if cnt == 3:
		print('YES')
		print(temp, temp, temp)
	elif cnt == 2:
		print('YES')
		print(temp, min(x, y, z), min(x, y, z))
	else:
		print('NO')


t = int(input())
for i in range(t):
	xyz = [int(xyz) for xyz in input().split(' ')]
	if xyz[0] == xyz[1] and xyz[1] == xyz[2]:
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	elif xyz[0] == xyz[1] and max(xyz) == xyz[0]:
		xyz[1] = 1
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	elif xyz[0] == xyz[2] and max(xyz) == xyz[0]:
		xyz[2] = 1
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	elif xyz[1] == xyz[2] and max(xyz) == xyz[1]:
		xyz[2] = 1
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	else:
		print('NO')


from __future__ import division, print_function
import os, sys
import math
import collections
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

def primeFactors(n):
	j = []
	while n % 2 == 0:
		j.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			j.append(int(n))
			n = n / i
	if n > 2:
		j.append(int(n))
	return j

def sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def largeseq1(a, cost, ini, des):
	ind = -1
	mx = -1000000007
	j = 0
	for i in range(des - 1, ini):
		if a[i] > mx:
			mx = a[i]
			j += cost[i]
			ind = i
	if ind != ini - 1:
		return -1
	else:
		return j

def largeseq2(a, cost, ini, des):
	ind = -1
	mx = -1000000007
	j = 0
	for i in range(des - 1, ini - 2, -1):
		if a[i] > mx:
			mx = a[i]
			j += cost[i]
			ind = i
	if ind != ini - 1:
		return -1
	else:
		return j

def main():
	for _ in range(ii()):
		(x, y, z) = mi()
		a = 0
		b = 0
		c = 0
		if x == y:
			a = x
			b = z
			c = z
		elif x == z:
			b = x
			a = y
			c = y
		elif y == z:
			c = y
			a = x
			b = x
		if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
			print('YES')
			print(a, b, c)
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
myList = []
for i in range(t):
	a = sorted(list(map(int, input().split())))
	if a[1] != a[2]:
		myList.append('NO')
	elif a[0] == a[1]:
		myList.append((a[0], a[0], a[2]))
	else:
		myList.append((a[0], a[0], a[2]))
for elem in myList:
	if len(elem) != 3:
		print('NO')
	else:
		print('YES')
		print(*elem)


n = int(input())
for q in range(n):
	(a, b, c) = list(map(int, input().split()))
	if (a == b and a > c or (b == c and b > a) or (c == a and c > b)) or (a == b and b == c):
		print('YES')
		print(max(a, b, c), min(a, b, c), 1)
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	r = min(x, y, z)
	if m == r:
		print('YES')
		print(m, ' ', m, ' ', m)
		continue
	s = x + y + z
	temp = s - m - r
	if temp == m:
		print('YES')
		print(m, ' ', r, ' ', r)
		continue
	else:
		print('NO')


from math import *
tests = int(input())
for t in range(tests):
	(x, y, z) = map(int, input().split())
	mi = min(x, y, z)
	ma = max(x, y, z)
	mid = x + y + z - mi - ma
	if ma != mid:
		print('NO')
	else:
		print('YES')
		print(ma, mi, mi)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	m = max(l)
	m1 = min(l)
	if m == max(l[0], l[1]) and m == max(l[1], l[2]) and (m == max(l[0], l[2])):
		print('YES')
		print(m1, m1, m)
	else:
		print('NO')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math as mt
from collections import deque

def main():
	for _ in range(ri()):
		l = ria()
		z = max(l)
		t = 0
		for i in l:
			if i == z:
				t += 1
		if t < 2:
			print('NO')
		else:
			print('YES')
			print(min(l), min(l), max(l))

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
main()


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

def primeFactor(N):
	(i, n) = (2, N)
	ret = {}
	(d, sq) = (2, 99)
	while i <= sq:
		k = 0
		while n % i == 0:
			(n, k, ret[i]) = (n // i, k + 1, k + 1)
		if k > 0 or i == 97:
			sq = int(n ** (1 / 2) + 0.5)
		if i < 4:
			i = i * 2 - 1
		else:
			(i, d) = (i + d, d ^ 6)
	if n > 1:
		ret[n] = 1
	return ret

def divisor(n):
	div = [1]
	for (i, j) in primeFactor(n).items():
		div = [i ** k * d for d in div for k in range(j + 1)]
	return div

def PrimeNumSet(N):
	M = int(N ** 0.5)
	seachList = [i for i in range(2, N + 1)]
	primes = []
	while seachList:
		if seachList[0] > M:
			break
		primes.append(seachList[0])
		tmp = seachList[0]
		seachList = [i for i in seachList if i % tmp != 0]
	return primes + seachList

def LCM(b, mo=10 ** 9 + 7):
	prs = PrimeNumSet(max(b))
	M = dict(zip(prs, [0] * len(prs)))
	for i in b:
		dc = primeFactor(i)
		for (j, k) in dc.items():
			M[j] = max(M[j], k)
	r = 1
	for (j, k) in M.items():
		if k != 0:
			r *= pow(j, k, mo)
			r %= mo
	return r
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	p = LI()
	(x, y, z) = p
	if p.count(max(p)) < 2:
		Yn(0)
		continue
	Yn(1)
	if p.count(max(p)) == 3:
		ans = [max(p)] * 3
	else:
		(M, m) = (max(p), min(p))
		ans = [m] * 3
		if x == y:
			k = 0
		elif y == z:
			k = 2
		else:
			k = 1
		ans[k] = M
	print(*ans)


t = int(input())
for i in range(t):
	(x, y, z) = [int(j) for j in input().split()]
	ans = []
	if x == y and z <= x:
		ans = [z, z, x]
	elif x == z and y <= z:
		ans = [y, y, x]
	elif y == z and x <= z:
		ans = [x, x, y]
	else:
		ans = []
	if len(ans) > 0:
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	x = list(map(int, input().split()))
	maxx = max(x)
	cnt = 0
	for i in range(3):
		if x[i] == maxx:
			cnt += 1
		else:
			z = x[i]
	if cnt < 2:
		print('NO')
	elif cnt == 3:
		print('YES')
		print(maxx, maxx, maxx)
	elif cnt == 2:
		print('YES')
		print(maxx, z, z)


def main():
	t = int(input())
	for __ in range(t):
		a = sorted(list(map(int, input().split())))
		if a[2] != a[1]:
			print('NO')
		else:
			print('YES')
			if a[0] == a[1]:
				print(a[2], a[2], a[2])
			else:
				print(1, a[0], a[2])
main()


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


for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = [x, y, z]
	a = max(x, y, z)
	if x == y == z:
		print('YES')
		print(x, y, z)
	elif l.count(a) == 2:
		print('YES')
		b = min(x, y, z)
		if b == 1:
			c = 1
		else:
			c = b - 1
		print(a, b, c)
	else:
		print('NO')


def solve(x, y, z):
	s = set([x, y, z])
	if len(s) == 3:
		print('NO')
		return
	if x > y and x > z or (y > x and y > z) or (z > x and z > y):
		print('NO')
		return
	if x == y:
		print('YES')
		print(x, z, 1)
		return
	if x == z:
		print('YES')
		print(y, x, 1)
		return
	if y == z:
		print('YES')
		print(1, x, y)
		return
t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	solve(l[0], l[1], l[2])


T = int(input())
for _ in range(T):
	l = sorted([int(x) for x in input().strip().split(' ')])
	if l[-1] == l[-2]:
		print('YES')
		print(f'{l[-3]} {l[-3]} {l[-1]}')
	else:
		print('NO')


test = int(input())
for x in range(test):
	numbers = sorted([int(x) for x in input().split()])
	if numbers[1] != numbers[2]:
		print('NO')
	else:
		print('YES')
		print(numbers[2], numbers[0], int(1))


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


number_test = int(input())
lista = []
for test in range(number_test):
	numbers = input()
	numbers_list = [int(number) for number in numbers.split()]
	nmax = numbers_list.count(max(numbers_list))
	numbers_list.sort(reverse=True)
	list_answer = []
	if nmax < 2:
		list_answer.append('NO')
		lista.append(list_answer)
	else:
		list_answer.append('YES')
		a = max(numbers_list)
		b = numbers_list[2]
		list_answer.append(str(a))
		list_answer.append(str(b))
		if numbers_list[0] == numbers_list[2]:
			list_answer.append(str(b))
		else:
			for c in range(b + 1):
				if c != 0 and c <= b:
					list_answer.append(str(c))
					break
		lista.append(list_answer)
for nums in lista:
	if len(nums) != 1:
		print(nums[0])
		print(' '.join(nums[1:]))
	else:
		print(nums[0])


t = int(input())
for _ in range(t):
	(x, y, z) = [int(a) for a in input().split()]
	if x == y == z:
		print('YES')
		print(x, x, x)
	elif x == y and x > z or (y == z and y > x) or (x == z and x > y):
		m = max(x, y, z)
		m1 = min(x, y, z)
		print('YES')
		print(m, m1, m1)
	else:
		print('NO')


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


t = int(input())
for _ in range(t):
	xyz = list(map(int, input().split()))
	xyz = sorted(xyz)
	if xyz[0] == xyz[2]:
		print('YES')
		print(xyz[0], xyz[1], xyz[2])
	elif xyz[1] == xyz[2]:
		print('YES')
		print(xyz[0], xyz[2], 1)
	else:
		print('NO')


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	a = max(lst)
	cnt = 0
	for i in lst:
		if i == a:
			cnt += 1
	if cnt >= 2:
		print('YES')
		a = max(lst)
		b = min(lst)
		c = b - 1
		if b == 1:
			c += 1
		print(a, b, c)
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	ma = max(a)
	mi = min(a)
	c = a.count(ma)
	if c == 1:
		print('NO')
	else:
		print('YES')
		print(mi, mi, ma)


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	l.sort()
	if l.count(max(l)) >= 2:
		print('YES')
		print(l[2], l[0], l[0])
	else:
		print('NO')


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	if x != y and x != z and (y != z) or (x == y and x < z) or (x == z and x < y) or (z == y and x > z):
		print('NO')
	else:
		print('YES')
		if x == y:
			a = x
			b = z
			c = 1
		elif x == z:
			b = x
			a = y
			c = 1
		elif z == y:
			a = z
			b = x
			c = 1
		print(a, b, c)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	mi = min(l)
	ma = max(l)
	if l[0] == l[1] and l[1] == l[2]:
		print('YES')
		print(mi, mi, mi)
	elif l.count(ma) > l.count(mi):
		print('YES')
		print(mi, ma, 1)
	else:
		print('NO')


t = int(input())
for x in range(t):
	[x, y, z] = list(map(int, input().strip().split()))
	same = 0
	maxx = max(x, y, z)
	minn = min(x, y, z)
	if x == maxx:
		same += 1
	if y == maxx:
		same += 1
	if z == maxx:
		same += 1
	if same == 1:
		print('NO')
	elif same == 3:
		print('YES')
		print(x, x, x)
	elif same == 2:
		print('YES')
		print(maxx, minn, minn)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = max(x, y, z)
	b = min(x, y, z)
	l = [x, y, z]
	p = l.count(a)
	if p >= 2:
		print('YES')
		print(a, b, b)
	else:
		print('NO')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	d = [a, b, c]
	k = max(a, b, c)
	l = min(a, b, c)
	del d[d.index(k)]
	del d[d.index(l)]
	if d[0] == k:
		print('YES')
		print(k, l, l)
	else:
		print('NO')


T = int(input())
for i in range(T):
	temp = input()
	temp_result = temp
	temp = temp.split()
	for j in range(3):
		temp[j] = int(temp[j])
	temp.sort()
	if temp[0] < temp[1] and temp[1] < temp[2] or (temp[0] == temp[1] and temp[1] < temp[2]):
		print('NO')
	elif temp[0] == temp[1] and temp[1] == temp[2]:
		print('YES')
		print(temp_result)
	else:
		print('YES')
		if temp[0] != 1:
			print(temp[2], temp[0], temp[0] - 1)
		else:
			print(temp[2], temp[0], temp[0])


test = int(input())
for i in range(test):
	(x, y, z) = map(int, input().split())
	val1 = max(x, y, z)
	val2 = min(x, y, z)
	if x == y and x == val1 or (y == z and y == val1) or (z == x and val1 == z):
		print('YES')
		print(val1, val2, val2)
	else:
		print('NO')


from collections import Counter

def solve(x, y, z):
	if x == y == z:
		return (x, y, z)
	d = Counter([x, y, z])
	if x < y < z:
		return (-1, -1, -1)
	if len(d) == 3:
		return (-1, -1, -1)
	(two, one) = (0, 0)
	for i in d:
		if d[i] == 1:
			one = i
		elif d[i] == 2:
			two = i
	if two < one:
		return (-1, -1, -1)
	if two > one:
		if x == y:
			a = x
			b = c = z
		elif y == z:
			c = y
			a = b = x
		elif z == x:
			b = x
			a = c = y
		return (a, b, c)
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	(a, b, c) = solve(x, y, z)
	if a == -1:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


for i in range(int(input())):
	x = [int(x) for x in input().split()]
	x.sort()
	if x[0] == x[1] and x[1] < x[2] or (x[0] < x[1] and x[1] < x[2]):
		print('NO')
		continue
	else:
		print('YES')
		if x[0] == 2 and x[1] == 3 and (x[2] == 3):
			print(3, 2, 1)
			continue
		print(x[0], x[0], x[1])


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	l = [a, b, c]
	mx = max(a, b, c)
	mn = min(a, b, c)
	if l.count(mx) == 1:
		print('NO')
	else:
		print('YES')
		print(mx, mn, mn)


n = int(input())
for _ in range(n):
	(x, y, z) = map(int, input().split())
	set1 = set([x, y, z])
	set1 = list(set1)
	if len(set1) == 1:
		print('YES')
		print(x, y, z)
	elif len(set1) == 2:
		a1 = set1[0]
		a = [x, y, z].count(a1)
		b1 = set1[1]
		b = [x, y, z].count(b1)
		if b > a and b1 > a1:
			print('YES')
			print(b1, a1, a1)
		elif a > b and a1 > b1:
			print('YES')
			print(a1, b1, b1)
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	print('NO') if [max(lst) > i for i in lst].count(True) == 2 else print('YES\n{} {} 1'.format(max(lst), min(lst)))


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	s = set([x, y, z])
	if len(s) == 3:
		print('NO')
	elif len(s) == 2 and (sum([x, y, z]) - min(x, y, z)) // 2 != max(x, y, z):
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))


TC = int(input())
for tc in range(TC):
	(X, Y, Z) = sorted(map(int, input().split()), reverse=True)
	if X == Y:
		A = X
		B = Z
		C = Z
		print('YES')
		print(A, B, C)
	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')


t = int(input())
for test in range(t):
	l = list(map(int, input().split()))
	m = min(l)
	ma = max(l)
	c = 0
	for i in range(len(l)):
		if l[i] == ma:
			c += 1
	if c == 3:
		print('YES')
		print(l[0], l[0], l[0])
	elif c == 2:
		print('YES')
		print(m, ma, '1')
	else:
		print('NO')


t = int(input())
for ele in range(t):
	arr = [int(x) for x in input().split()]
	m = max(arr)
	count = 0
	for ele in arr:
		if ele == m:
			count += 1
	if count >= 2:
		print('YES')
		print(min(arr), min(arr), m)
	else:
		print('NO')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	s = set(l)
	if len(s) == 3:
		print('NO')
		continue
	if len(s) == 1:
		print('YES')
		print(*l)
		continue
	maxi = max(s)
	mini = min(s)
	if l.count(maxi) == 1:
		print('NO')
		continue
	print('YES')
	print(maxi, mini, mini)


if True:
	for _ in range(int(input())):
		while True:
			break
		(xVal, yVal, zVal) = map(int, input().split())
		if xVal == yVal and xVal == zVal and (yVal == zVal):
			print('YES')
			print(xVal, yVal, zVal)
		elif True:
			if xVal == yVal:
				aVal = xVal
				bVal = zVal
				cVal = zVal
				if max(aVal, bVal) == xVal and max(aVal, cVal) == yVal and (max(bVal, cVal) == zVal):
					print('YES')
					print(aVal, bVal, cVal)
				else:
					print('NO')
			elif xVal == zVal:
				aVal = yVal
				bVal = xVal
				cVal = yVal
				if max(aVal, bVal) == xVal and max(aVal, cVal) == yVal and (max(bVal, cVal) == zVal):
					print('YES')
					print(aVal, bVal, cVal)
				else:
					print('NO')
			elif yVal == zVal:
				aVal = xVal
				bVal = xVal
				cVal = yVal
				if max(aVal, bVal) == xVal and max(aVal, cVal) == yVal and (max(bVal, cVal) == zVal):
					print('YES')
					print(aVal, bVal, cVal)
				else:
					print('NO')
			else:
				print('NO')


import sys
from collections import Counter
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	mx = max([x, y, z])
	mn = min([x, y, z])
	freq = Counter([x, y, z])
	if freq[mx] >= 2:
		print('YES')
		print(mx, mn, mn)
	else:
		print('NO')


import sys
from math import floor as fl
from math import ceil as ce
from math import sqrt
cont = sys.stdin.readlines()
cont = [i.strip('\n').split() for i in cont]
num = int(cont.pop(0)[0])
for i in cont:
	(x, y, z) = [int(j) for j in i]
	if len(set([x, y, z])) == 3 or [x, y, z].count(max(x, y, z)) == 1:
		print('NO')
	else:
		maxx = max(x, y, z)
		minn = min(x, y, z)
		print(f'YES\n{maxx} {minn} {minn}')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	d = max(a, b, c)
	e = [a, b, c].count(d)
	if e == 2:
		print('YES')
		print(1, d, min([a, b, c]))
	elif e == 3:
		print('YES')
		print(d, d, d)
	else:
		print('NO')


t = int(input())
while t:
	a = list(map(int, input().rstrip().split()))
	if a[0] == a[1] and a[1] == a[2]:
		print('YES')
		print(str(a[0]) + ' ' + str(a[2]) + ' ' + str(a[2]))
	elif a[0] == a[1] and a[0] > a[2]:
		print('YES')
		print(str(a[0]) + ' ' + str(a[2]) + ' ' + str(a[2]))
	elif a[0] == a[2] and a[0] > a[1]:
		print('YES')
		print(str(a[0]) + ' ' + str(a[1]) + ' ' + str(a[1]))
	elif a[1] == a[2] and a[1] > a[0]:
		print('YES')
		print(str(a[0]) + ' ' + str(a[0]) + ' ' + str(a[1]))
	else:
		print('NO')
	t -= 1


def main():
	t = int(input())
	ans = []
	for i in range(t):
		(x, y, z) = map(int, input().split())
		if x != y and y != z and (x != z):
			ans.append('NO')
		else:
			if x == y:
				a = x
				b = z
				c = 1
			elif y == z:
				c = y
				b = x
				a = 1
			else:
				b = x
				a = y
				c = 1
			if x == max(a, b) and y == max(a, c) and (z == max(b, c)):
				ans.append('YES')
				ans.append(str(a) + ' ' + str(b) + ' ' + str(c))
			else:
				ans.append('NO')
	for i in ans:
		print(i)
main()


import sys
for _ in range(int(sys.stdin.readline().rstrip())):
	(x, y, z) = list(map(int, sys.stdin.readline().rstrip().split()))
	if x == y and x >= z:
		print('YES')
		print(f'{x} {z} {z}')
	elif x == z and x >= y:
		print('YES')
		print(f'{y} {x} {y}')
	elif y == z and y >= x:
		print('YES')
		print(f'{x} {x} {y}')
	else:
		print('NO')


a = int(input())
for i in range(0, a):
	(a, b, c) = map(int, input().split())
	arr = [a, b, c]
	arr.sort()
	if a == b or b == c or c == a:
		if arr[0] == arr[1] and (not arr[0] == arr[2]):
			print('NO')
		elif arr[0] == arr[1] and arr[1] == arr[2]:
			print('YES')
			print(a, b, c)
		elif arr[1] == arr[2] and (not arr[1] == arr[0]):
			print('YES')
			print(arr[1], arr[0], arr[0])
	else:
		print('NO')


from collections import defaultdict, Counter
from math import log, ceil, floor

def solve():
	(x, y, z) = list(map(int, input().split()))
	l = [x, y, z]
	if len(set(l)) == 3:
		print('NO')
		return
	l.sort()
	if l[0] == l[1] and l[1] != l[2]:
		print('NO')
	else:
		print('YES')
		print(l[0], l[0], l[2])
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	(X, Y, Z) = map(int, input().split())
	if X == Y >= Z or Y == Z >= X or X == Z >= Y:
		print('YES')
		print(max(X, Y, Z), min(X, Y, Z), min(X, Y, Z))
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	c = 0
	maxv = max(x, y, z)
	minv = min(x, y, z)
	if x == maxv:
		c += 1
	if y == maxv:
		c += 1
	if z == maxv:
		c += 1
	if c < 2:
		print('NO')
		continue
	else:
		print('YES')
		print(1, minv, maxv)


t = int(input())
for i in range(t):
	l = sorted(list(map(int, input().split())))
	p = max(l)
	q = min(l)
	l[0] -= p
	l[1] -= p
	l[2] -= p
	if l.count(0) == 2:
		print('YES')
		print(p, q, 1)
	elif l.count(0) == 3:
		print('YES')
		print(p, p, p)
	else:
		print('NO')


import math
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = max(x, y, z)
	if [x, y, z].count(m) < 2:
		print('NO')
	else:
		print('YES')
		print(m, min(x, y, z), min(x, y, z))


import sys
input = sys.stdin.readline
for f in range(int(input())):
	arr = list(map(int, input().split()))
	a = max(arr)
	if arr.count(a) >= 2:
		print('YES')
		print(min(arr), min(arr), max(arr))
	else:
		print('NO')


import sys
q = int(input())
for i in range(q):
	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')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	z = [a, b, c]
	z.sort()
	if a != b and b != c and (a != c):
		print('NO')
	elif z[0] == z[1] and z[1] != z[2]:
		print('NO')
	elif a == b and a == c and (b == c):
		print('YES')
		print(a, b, c)
	else:
		print('YES')
		print(z[0], z[0], z[2])


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a != b and b != c and (c != a):
		print('NO')
	elif a == b and b == c:
		print('YES')
		print(a, a, a)
	elif a == b and c > a or (b == c and a > b) or (a == c and b > a):
		print('NO')
	elif a == b and c < a or (b == c and a < b) or (a == c and b < a):
		print('YES')
		minn = min(a, b, c)
		print(minn, minn, max(a, b, c))


for _ in range(int(input())):
	List = [int(x) for x in input().split()]
	List.sort()
	if List[1] == List[2] and List[1] != List[0]:
		print('YES')
		print(List[0], List[0], List[1])
	elif List[0] == List[1] == List[2]:
		print('YES')
		print(*List)
	else:
		print('NO')


def Max(x, y, z):
	(a, b, c) = (-1, -1, -1)
	if x == y == z:
		(a, b, c) = (x, x, x)
	elif x == y and max(y, z) == y:
		a = z
		b = x
		c = z
	elif x == y and max(y, z) == z:
		a = -1
		b = -1
		c = -1
	elif max(x, y) == x and y == z:
		a = -1
		b = -1
		c = -1
	elif max(x, y) == y and y == z:
		a = x
		b = x
		c = y
	elif x == z and max(y, z) == z:
		a = x
		b = y
		if y == 1:
			c = y
		else:
			c = y - 1
	elif x == z and max(y, z) == y:
		(a, b, c) = (-1, -1, -1)
	return (a, b, c)
n = int(input())
for i in range(0, n):
	(x, y, z) = map(int, input().split())
	(a, b, c) = Max(x, y, z)
	if a == -1:
		print('NO')
	else:
		print('YES')
		print(str(a) + ' ' + str(b) + ' ' + str(c))


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	l = []
	l.append(x)
	l.append(y)
	l.append(z)
	x = max(l)
	y = l.count(x)
	if y > 1:
		print('YES')
		if len(list(set(l))) == 1:
			print(*l)
		else:
			l = list(set(l))
			c = min(l)
			for i in l:
				print(i, end=' ')
			print(c)
	else:
		print('NO')


for i in range(int(input())):
	ls = [int(a) for a in input().split()]
	ls1 = [1] * 3
	if ls.count(max(ls)) > 1:
		if ls.count(max(ls)) == 3:
			ls1 = ls
		else:
			ls1[ls.index(min(ls))] = min(ls)
			ls1[ls.index(min(ls)) - 1] = max(ls)
		print('YES')
		for _ in range(3):
			print(ls1[_], end=' ')
		print('\n')
	else:
		print('NO')


for i in range(int(input())):
	(a, b, c) = [int(i) for i in input().split()]
	if a == b == c:
		print('YES')
		print(a, b, c)
	elif a == b or b == c or c == a:
		if a == b:
			if a > c:
				print('YES')
				print(c, c, a)
			else:
				print('NO')
		elif b == c:
			if b > a:
				print('YES')
				print(a, a, b)
			else:
				print('NO')
		elif c == a:
			if c > b:
				print('YES')
				print(b, b, c)
			else:
				print('NO')
	else:
		print('NO')


def print_res(x, y, z):
	res = str(x) + ' ' + str(y) + ' ' + str(z)
	print('YES')
	print(res)
t = int(input())
test_cases = []
for i in range(t):
	l = list(map(int, input().split()))
	test_cases.append(l)
for i in range(t):
	if test_cases[i][0] == test_cases[i][1] == test_cases[i][2]:
		print_res(test_cases[i][0], test_cases[i][0], test_cases[i][0])
	elif test_cases[i][0] == test_cases[i][1] and test_cases[i][2] < test_cases[i][0]:
		print_res(1, test_cases[i][0], test_cases[i][2])
	elif test_cases[i][0] == test_cases[i][2] and test_cases[i][1] < test_cases[i][0]:
		print_res(1, test_cases[i][0], test_cases[i][1])
	elif test_cases[i][1] == test_cases[i][2] and test_cases[i][0] < test_cases[i][1]:
		print_res(1, test_cases[i][0], test_cases[i][1])
	else:
		print('NO')


def solution(arr):
	d = {}
	for i in arr:
		d[i] = d.get(i, 0) + 1
	l = list(d.keys())
	if len(l) == 3:
		return (False, [])
	if len(l) == 1:
		return (True, arr)
	(a, b) = (min(l), max(l))
	if d[b] == 1:
		return (False, [])
	if a == 1:
		return (True, [b, a, a])
	ele = [b, a, a - 1]
	return (True, ele)
for _ in range(int(input())):
	arr = [int(x) for x in input().split()]
	(cond, ans) = solution(arr)
	if cond:
		print('YES')
		print(*ans)
	else:
		print('NO')


kk = [list(map(int, input().split())) for i in range(int(input()))]
for elem in kk:
	if elem.count(max(elem)) < 2:
		print('NO')
		continue
	else:
		print('YES')
		elem[elem.index(max(elem))] = min(elem)
		for i in range(3):
			if i == 2:
				print(elem[i])
			else:
				print(elem[i], end=' ')


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()


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = set([x, y, z])
	ans = 'NO'
	ans_arr = []
	if len(a) == 1:
		ans = 'YES'
		ans_arr = [x] * 3
	elif len(a) == 2:
		lis = list(a)
		mini = min(lis)
		maxi = max(lis)
		tot = [x, y, z]
		min_count = tot.count(mini)
		max_count = tot.count(maxi)
		if max_count > min_count:
			ans = 'YES'
			ans_arr = [mini, mini, maxi]
	if ans == 'YES':
		print(ans)
		print(*ans_arr)
	else:
		print(ans)


t = int(input())
i = 0
while i < t:
	xyz = list(map(int, input().split()))
	i += 1
	x = xyz[0]
	y = xyz[1]
	z = xyz[2]
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	else:
		if x == y:
			if x > z:
				print('YES')
				print(x, z, z)
			else:
				print('NO')
		if x == z:
			if x > y:
				print('YES')
				print(x, y, y)
			else:
				print('NO')
		if z == y:
			if z > x:
				print('YES')
				print(z, x, x)
			else:
				print('NO')
	if x != y and x != z and (z != y):
		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)


import math
for _ in range(int(input())):
	A = list(map(int, input('').split()))
	A.sort()
	if A[-1] == A[-2]:
		print('YES')
		print(A[-1], A[0], A[0])
	else:
		print('NO')


for s in range(int(input())):
	(x, y, z) = sorted(map(int, input().split(' ')))
	if y == z:
		print('YES')
		print(x, x, y)
	else:
		print('No')


import sys, math
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for cs in wtf[1:]:
	arr = sorted(map(int, cs.split(' ')))
	print('NO' if arr[1] != arr[2] else 'YES\n' + f'{arr[0]} ' * 2 + f'{arr[2]}')


for _ in range(int(input())):
	a = sorted(list(map(int, input().split())), reverse=True)
	if a[0] == a[1]:
		if a[1] == a[2]:
			print('YES')
			print(*a)
		elif a[2] < a[1]:
			print('YES')
			print(a[1], a[2], a[2])
		else:
			print('NO')
	else:
		print('NO')


q = int(input())
for blah in range(q):
	(x, y, z) = map(int, input().split(' '))
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	else:
		arr = [x, y, z]
		if len(set(arr)) == 3:
			print('NO')
			continue
		elif x == z and y < z:
			print('YES')
			print(x, y, min(x, y))
		else:
			temp = arr.count(min(arr))
			if temp == 2:
				print('NO')
			else:
				print('YES')
				arr = list(set(arr))
				print(arr[0], arr[1], min(arr))


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	found = True
	if x == y and x >= z:
		(a, b, c) = (x, z, z)
	elif x == z and x >= y:
		(a, b, c) = (y, x, y)
	elif y == z and y >= x:
		(a, b, c) = (x, x, y)
	else:
		found = False
	if found:
		print('YES')
		print(a, b, c)
	else:
		print('NO')


t = int(input())
tests = []
for i in range(t):
	l = input().split()
	xyz = [int(i) for i in l]
	tests.append(xyz)
for t in tests:
	x = t[0]
	y = t[1]
	z = t[2]
	if x == y and y == z and (z == x):
		print('YES')
		print(x, y, z)
	elif x != y and y != z and (z != x):
		print('NO')
	else:
		lisst = sorted(t)
		if lisst[1] == lisst[0]:
			print('NO')
		elif lisst[1] > lisst[0]:
			print('YES')
			print(lisst[1], lisst[0], 1)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	a = l
	a.sort()
	if len(set(l)) > 2:
		print('NO')
		continue
	elif a[0] == a[1] and a[1] < a[2]:
		print('NO')
		continue
	print('YES')
	print(a[0], a[0], a[1], end=' ')
	print()


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	maxnum = max(x, y, z)
	lst = [x, y, z]
	maxcnt = lst.count(maxnum)
	if maxcnt == 1:
		print('NO')
		continue
	if maxcnt == 3:
		print('YES')
		print(x, y, z)
	else:
		lst.sort(reverse=True)
		print('YES')
		print(lst[0], lst[2], lst[2])


for item in range(int(input())):
	mass = list(map(int, input().split()))
	(x, y, z) = (mass[0], mass[1], mass[2])
	if y == z and x <= y:
		print('YES')
		print(x, x, y)
	elif x == y and z < x:
		print('YES')
		print(x, z, z)
	elif x == z and y < z:
		print('YES')
		print(y, x, y)
	else:
		print('NO')


import os
is_dev = 'vscode' in os.environ
if is_dev:
	inF = open('in.txt', 'r')
	outF = open('out.txt', 'w')

def ins(r):
	return list(map(int, r.split(' ')))

def inputT():
	if is_dev:
		return inF.readline()
	else:
		return input()

def printT(data):
	if is_dev:
		return outF.write(data + '\n')
	else:
		return print(data)
for _ in range(int(inputT())):
	(x, y, z) = ins(inputT())
	xyz = set([x, y, z])
	maxyz = max([x, y, z])
	how_many_equal_max = len([i for i in [x, y, z] if i == maxyz])
	if how_many_equal_max >= 2:
		if x == y:
			a = x
			b = z
			c = z
		elif y == z:
			c = y
			b = x
			a = x
		else:
			b = x
			a = y
			c = y
		printT('YES')
		printT(f'{a} {b} {c}')
	else:
		printT('NO')
if is_dev:
	print(open('out.txt', 'r') == open('outactual.txt', 'r'))


from sys import *
t = int(stdin.readline())
while t > 0:
	(x, y, z) = map(int, stdin.readline().split())
	if x == y and y == z:
		print('YES')
		print(x, x, x)
	elif x == y and z < y:
		print('YES')
		print(x, z, z)
	elif y == z and x < y:
		print('YES')
		print(y, x, x)
	elif x == z and y < x:
		print('YES')
		print(x, y, y)
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	r = list(map(int, input().strip().split(' ')))
	s = sorted(r)
	if s.count(max(s)) >= 2:
		print('YES')
		print(max(s), s[0], s[0])
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z) = list(map(int, input().split()))
	(a, b, c) = (-1, -1, -1)
	if x == y:
		a = x
	if y == z:
		c = z
	if x == z:
		b = x
	l = [a, b, c]
	if -1 not in l:
		print('YES')
		print(*l)
	else:
		f = -1
		for i in l:
			if i != -1:
				f = i
				break
		if f == -1:
			print('NO')
		else:
			g = -1
			for i in [x, y, z]:
				if i != f and i < f:
					g = i
					break
			if g == -1:
				print('NO')
			else:
				print('YES')
				print(f, g, g)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z)
	else:
		p = max(x, y)
		q = max(z, p)
		if q == x == y:
			print('YES')
			print(x, z, z)
		elif q == y == z:
			print('YES')
			print(x, x, z)
		elif q == z == x:
			print('YES')
			print(x, y, y)
		else:
			print('NO')


def process(x, y, z):
	if y != z:
		print('NO')
		return
	print('YES')
	print(x, x, z)

def main():
	t = int(input())
	inputs = [[]] * t
	for i in range(t):
		xyz = list(map(int, input().split()))
		xyz.sort()
		inputs[i] = xyz
	for (x, y, z) in inputs:
		process(x, y, z)
main()


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x == y and y == z:
		print('YES')
		print(x, y, z)
	elif x == y or y == z or x == z:
		if x == y and z < x:
			print('YES')
			print(x, z, z)
		elif x == z and y < x:
			print('YES')
			print(x, y, y)
		elif z == y and x < z:
			print('YES')
			print(z, x, x)
		else:
			print('No')
	else:
		print('NO')


def iss(a, b, c):
	if x != max(a, b):
		return False
	if y != max(a, c):
		return False
	if z != max(b, c):
		return False
	return True
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if iss(x, x, y):
		print('YES')
		print(x, x, y)
	elif iss(y, x, y):
		print('YES')
		print(y, x, y)
	elif iss(x, z, y):
		print('YES')
		print(x, z, y)
	elif iss(y, z, y):
		print('YES')
		print(y, z, y)
	elif iss(x, x, z):
		print('YES')
		print(x, x, z)
	elif iss(y, x, z):
		print('YES')
		print(y, x, z)
	elif iss(x, z, z):
		print('YES')
		print(x, z, z)
	elif iss(y, z, z):
		print('YES')
		print(y, z, z)
	else:
		print('NO')


T = int(input())
import copy
for _ in range(T):
	a = list(map(int, input().split()))
	b = copy.deepcopy(a)
	a.sort()
	if a[1] != a[2]:
		print('NO')
	else:
		print('YES')
		x = max(a)
		if b[0] == x and b[1] == x:
			print(x, a[0], a[0])
		elif b[2] == x and b[1] == x:
			print(a[0], a[0], x)
		else:
			print(a[0], x, a[0])


input_length = int(input())
while input_length != 0:
	num_string = str(input())
	num_string = num_string.split()
	input_length -= 1
	num_string = [int(x) for x in num_string]
	num_string = tuple(num_string)
	(x, y, z) = num_string
	if x < y:
		c = y
		if z == y:
			print('YES')
			print(x, c, x)
		else:
			print('NO')
	elif x >= y:
		if x < z:
			print('NO')
		elif x > z:
			a = x
			if x != y:
				print('NO')
				continue
			if y < z:
				print('NO')
			elif y == z:
				print('YES')
				print(a, a, a)
			else:
				print('YES')
				print(a, z, z)
		else:
			b = x
			if x != z:
				print('NO')
				continue
			if z < y:
				print('NO')
			elif y == z:
				print('YES')
				print(b, b, b)
			else:
				print('YES')
				print(b, y, y)


t = int(input())
for _ in range(t):
	case = list(map(int, input().split()))
	if case[0] == case[1] == case[2]:
		print('YES')
		print(case[0], case[1], case[2])
	elif case[0] == case[1] and case[1] > case[2] or (case[0] == case[2] and case[2] > case[1]) or (case[1] == case[2] and case[2] > case[0]):
		print('YES')
		print(max(case[0], case[1], case[2]), 1, min(case[0], case[1], case[2]))
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		X = list(map(int, input().split()))
		if len(set(X)) == 1:
			print('YES')
			print(' '.join(list(map(str, X))))
		elif len(set(X)) == 2:
			Y = sorted(X)
			if Y[0] == Y[1]:
				print('NO')
			else:
				print('YES')
				print(Y[1], Y[0], Y[0])
		else:
			print('NO')
main()


import sys
input = sys.stdin.buffer.readline

def solution():
	for _ in range(int(input())):
		(x, y, z) = map(int, input().split())
		cnt = 0
		m = max(x, y, z)
		if x == m:
			cnt += 1
		if y == m:
			cnt += 1
		if z == m:
			cnt += 1
		if cnt >= 2:
			print('YES')
			print(m, min(x, y, z), 1)
		else:
			print('NO')
solution()


n = int(input())
while n:
	n -= 1
	listi = [int(j) for j in input().split()]
	listi.sort()
	if listi[1] != listi[2]:
		print('No')
	else:
		print('Yes')
		print(listi[0], ' ', listi[0], ' ', listi[2])


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x == y == z:
		print('YES')
		print(x, y, z, sep=' ')
	elif x == y or x == z or y == z:
		if [x, y, z].count(max(x, y, z)) == 2:
			a = [x, y, z]
			a.sort()
			if a[0] > 1:
				print('YES')
				print(max(x, y, z), a[0], a[0] - 1, sep=' ')
			else:
				print('YES')
				print(max(x, y, z), a[0], a[0], sep=' ')
		else:
			print('NO')
	else:
		print('NO')


def main():
	T = int(input())
	for _ in range(T):
		A = [int(i) for i in input().split()]
		B = sorted(A)
		if B[1] == B[2]:
			print('YES')
			idx = A.index(B[0])
			if idx == 0:
				print(B[0], B[0], B[2])
			elif idx == 1:
				print(B[0], B[2], B[0])
			else:
				print(B[2], B[0], B[0])
		else:
			print('NO')
main()


import sys
t = int(sys.stdin.readline())
while t:
	(x, y, z) = map(int, sys.stdin.readline().strip().split())
	if [x, y, z].count(max(x, y, z)) < 2:
		print('NO')
	else:
		print('YES')
		print(max(x, y, z), min(x, y, z), min(x, y, z))
	t -= 1


for _ in range(int(input())):
	nums = list(map(int, input().split()))
	if len(set(nums)) == 3:
		print('NO')
	elif len(set(nums)) == 1:
		print('YES')
		print(*nums)
	elif len(set(nums)) == 2:
		if nums.count(1) > 1:
			print('NO')
		elif nums.count(min(set(nums))) > nums.count(max(set(nums))):
			print('NO')
		else:
			print('YES')
			print(*set(nums), min(nums), end=' ')
			print()


t = int(input())
for _ in range(t):
	(x, y, z) = sorted(map(int, input().split()))
	(b, a, c) = (x, min(x, y), z)
	x1 = max(a, b)
	y1 = max(a, c)
	z1 = max(b, c)
	if x1 != x or y1 != y or z1 != z:
		print('NO')
	else:
		print('YES')
		print(a, b, c)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	max_xyz = max([x, y, z])
	min_xyz = min([x, y, z])
	if [x, y, z].count(max_xyz) == 1:
		print('NO')
	else:
		print('YES')
		if [x, y, z].count(max_xyz) == 3:
			print(x, y, z)
		elif x == max_xyz and y == max_xyz:
			print(min_xyz, max_xyz, min_xyz)
		elif x == max_xyz and z == max_xyz:
			print(max_xyz, min_xyz, min_xyz)
		else:
			print(min_xyz, min_xyz, max_xyz)


n = int(input())
ans = 0
for i in range(n):
	(x, y, z) = map(int, input().split(' '))
	if x == y and y == z:
		print('Yes')
		print(' '.join((str(x) for i in range(3))))
	elif x == y and z < y:
		print('Yes')
		print(z, z, y)
	elif y == z and x < y:
		print('Yes')
		print(x, x, y)
	elif x == z and y < x:
		print('Yes')
		print(y, y, x)
	else:
		print('No')


def a_b_c(A):
	if A[2] != A[1]:
		print('NO')
	if A[2] == A[1]:
		print('YES')
		print(A[2], A[0], A[0])
n = int(input())
for i in range(n):
	A = []
	(x, y, z) = map(int, input().split())
	A.append(x)
	A.append(y)
	A.append(z)
	A = sorted(A)
	a_b_c(A)


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
for t in range(int(input())):
	(x, y, z) = [int(x) for x in input().split()]
	if x >= y and x == z:
		print('YES')
		print(y, x, y)
	elif y >= z and x == y:
		print('YES')
		print(y, z, z)
	elif z >= x and y == z:
		print('YES')
		print(x, x, z)
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	maxv = max(x, y, z)
	minv = min(x, y, z)
	count = 0
	if x == maxv:
		count += 1
	if y == maxv:
		count += 1
	if z == maxv:
		count += 1
	if count <= 1:
		print('NO')
	else:
		print('YES')
		print(maxv, minv, minv)