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 
import math
from collections import Counter
# def printDivisors(n) :
#     i = 1
#     l = []
#     while i <= math.sqrt(n):
#         if (n % i == 0) :
#             if (n / i == i) :
#                 l.append(i)
#             else :
#                 l.append(i)
#                 l.append(n//i)
#         i = i + 1
#     return l
def primeFactors(n):
    l = []
    while n % 2 == 0:
        l.append(2)
        n = n // 2
    for i in range(3,int(math.sqrt(n))+1,2):
        while n % i == 0:
            l.append(i)
            n = n // i
    if n > 2:
        l.append(n)
    return l
for _ in range(int(input())):
    n = int(input())
    k = primeFactors(n)
    # print(*k)
    klen = len(set(k))
    if len(k) < 3:
        print("NO")
    elif klen == 3 and len(k) == 3:
        print("YES")
        print(*k)
    elif klen == 2 and len(k) >= 4:
        print("YES")
        a = k[0]
        b = k[-1]
        c = 1
        for t in k[1:len(k)-1]:
            c *= t
        print(a, b, c)
    elif klen >= 3:
        print("YES")
        kl = set(k)
        jk = list(kl)
        a = jk[0]
        b = jk[1]
        x = 1
        for t in k:
            x *= t
        print(a, b, ((x//a)//b))
    elif len(k) >= 6:
        print("YES")
        a = k[0]
        b = k[1]*k[2]
        c = 1
        for t in range(3, len(k)):
            c *= k[t]
        print(a, b, c)
    else:
        a = k[0]
        flag = 0
        x = 1
        for t in k[1::]:
            x *= t
        b = -1
        c = -1
        for t in range(1, len(k)):
            b = k[t]
            c = x//k[t]
            x //= k[t]
            if a != b and b != c and a != c and a*b*c == n:
                print("YES")
                flag = 1
                print(a, b, c)
                break
        if flag == 0:
            print("NO")