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 time
s=time.time()
primes=[]
poss=[True for i in range(40000)]
for i in range(2,40000):
    if(poss[i]):
        primes.append(i)
        for j in range(i,40000,i):
            poss[j]=False
# print(primes)
# print(time.time()-s)

def find(n):
    # n=int(input())
    primedivisor=[]
    for i in primes:
        if(i>n):
            break
        if(n%i==0):
            primedivisor.append(i)
    if(len(primedivisor)==0):
        # print("NO")
        return -1
    elif(len(primedivisor)==1):
        temp=1
        ans=-1
        while(n%temp==0):
            temp*=primedivisor[0]
            ans+=1 
        if(ans<3):
            # print("NO")
            return -1
        elif(ans<6):
            if(primedivisor[0]**ans !=n):
                return[1,primedivisor[0],primedivisor[0]**2]
            else:
                return -1
        else:
            # print("YES")
            return [primedivisor[0]**(ans-3),primedivisor[0],primedivisor[0]**2]
    elif(len(primedivisor)==2):
        temp=1
        ans=-1
        while(n%temp==0):
            temp*=primedivisor[0]
            ans+=1 
        temp=1
        ans2=-1
        while(n%temp==0):
            temp*=primedivisor[1]
            ans2+=1 
        # print(ans,ans2)
        if(ans>2):
            # print("YES")
            return [primedivisor[1]**ans2,primedivisor[0],primedivisor[0]**(ans-1)]
        elif(ans2>2):
            # print("YES")
            return [primedivisor[0]**ans,primedivisor[1],primedivisor[1]**(ans2-1)]
        elif(ans==2):
            if(ans2==1):
                # print("NO")
                if(primedivisor[0]**2)*primedivisor[1]!=n :
                    return[1,primedivisor[0],primedivisor[1]]
                return -1
            else:
                # print("YES")
                return [primedivisor[1]*primedivisor[0],primedivisor[0],primedivisor[1]]
        elif(ans2==2):
            if(ans==1):
                # print("NO")
                if(primedivisor[1]**2)*primedivisor[0]!=n :
                    return[1,primedivisor[0],primedivisor[1]]
                return -1
            else:
                # print("YES")
                return [primedivisor[1]*primedivisor[0],primedivisor[0],primedivisor[1]]
        elif(ans==1 and ans2==1):
            if(primedivisor[1]*primedivisor[0]!=n):
                return[1,primedivisor[0],primedivisor[1]]
            return-1

    else:
        # print("YES")
        ap=[]
        temp=1
        while(n%temp==0):
            temp*=primedivisor[0]
        # print(temp//primedivisor[0],end=" ")
        ap.append(temp//primedivisor[0])
        temp=1
        while(n%temp==0):
            temp*=primedivisor[1]
        # print(temp//primedivisor[1],end=" ")
        ap.append(temp//primedivisor[1])
        temp=1
        for j in range(2,len(primedivisor)):
            while(n%temp==0):
                temp*=primedivisor[j]
            temp=temp//primedivisor[j]
        # print(temp,end=" ")
        ap.append(temp)
        return ap 

t=int(input())
for _ in range(t):
    n=int(input())
    x=find(n)
    # print(x)
    if(x!=-1):
        temp=x[0]*x[1]*x[2]
        if(temp!=n):
            x[0]*=n//temp
        print("YES")
        print(*x)
    else:
        print("NO")

        