You are given one integer number n. Find three distinct integers a, b, c such that 2 ≤ a, b, c and a ⋅ b ⋅ c = n or say that it is impossible to do it.

If there are several answers, you can print any.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 100) — the number of test cases.

The next n lines describe test cases. The i-th test case is given on a new line as one integer n (2 ≤ n ≤ 10^9).

Output

For each test case, print the answer on it. Print "NO" if it is impossible to represent n as a ⋅ b ⋅ c for some distinct integers a, b, c such that 2 ≤ a, b, c.

Otherwise, print "YES" and any possible such representation.

Example

Input


5
64
32
97
2
12345


Output


YES
2 4 8 
NO
NO
NO
YES
3 5 823 
from math import *
from operator import *

def isPrime(x):
	if(x in [1,4]):
		return False
	elif(x in [2,3,5]):
		return True
	else:
		for i in range(2,int(sqrt(x))+1):
			if(x%i == 0):
				return False
		return True

def Sieve(x):
	checkPrime = [1 for i in range(x+1)]
	zz = 2
	L = []
	while(zz**2 <= x):
		if(checkPrime[zz] == 1):
			for i in range(zz*2,x+1,zz):
				checkPrime[i] = 0
		zz += 1
	for i in range(2,x):
		if(checkPrime[i] == 1):
			L.append(i)
	return checkPrime

checkPrime = Sieve(100001)

def primeFactors(x):
	d = {}
	i = 0
	X = x
	while(x%2 == 0):
		x //= 2
		i += 1
	if(i > 0):
		d[2] = i
	for i in range(3,int(sqrt(x))+1,2):
		zz = 0
		while(x%i == 0):
			x //= i
			zz += 1
		if(zz > 0):
			d[i] = zz
	if(x > 2):
		d[x] = 1
	return d


T = int(input())
for tt in range(T):
	x = int(input())
	if(x%2 != 0 and x%3 != 0 and isPrime(x)):
		print('NO')
	elif(isPrime(x)):
		print('NO')
	else:
		d = primeFactors(x)
		# print('d:',d)
		ans = [0,0,0]
		if(len(d) > 2):
			print('YES')
			for i in d:
				if(ans[0] == 0):
					ans[0] = i
				elif(ans[1] == 0):
					ans[1] = i
				else:
					break
			ans[2] = x//(ans[0]*ans[1])
			print(*ans)
		elif(len(d) == 1):
			for i in d:
				if(d[i] < 6):
					print('NO')
				else:
					print('YES')
					print(i,i**2,x//(i*i**2))
		else:
			ans = [0]*3
			d = sorted(d.items(), key=itemgetter(1))
			if(d[0][1] >= 6):
				print('YES')
				i = d[0][0]
				print(i,i**2,x//(i*i**2))
			elif(d[0][1] + d[1][1] >= 4):
				print('YES')
				print(d[0][0],d[1][0],x//(d[0][0]*d[1][0]))
			else:
				print('NO')

