Problem: 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 

Solution (in JAVA):

Solution:
// Working program using Reader Class
// Probably fastest
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.List;
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
import java.util.Comparator;
import java.util.stream.IntStream;
import java.util.ArrayDeque;
import java.util.Set;
import java.util.HashSet;
import java.util.PriorityQueue;
 
public class Main1 {
    private static PrintWriter out = new PrintWriter(System.out);
    // private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {


       int t = fs.nextInt();
       outer :while(t-->0)
        {
            List<Integer> list = new ArrayList<>();
            // Set<Integer> set = new HashSet<>();
            int n = fs.nextInt();
            int n1 =n;
            int count =0;
            // int arr[] = new int [1001];
            int res[] = new int[2];
            int kl = 0;
            // int res[] = new int[2];

            for(int i=2;i*i<=n;i++)
            {
                
                if(n%i==0 &&kl<2)
                {
                    count++;
                    res[kl] = i;
                    // System.out.println(i);
                    kl++;
                }
                while(n%i==0)
                {
                
                    list.add(i);
                    n/=i;
                }


                                
                
            }
            if(n>1)
            {
                
                if(kl==1 && n != res[kl-1])
                {
                    res[kl] = n;
                    count++;
                }
                list.add(n);
            }
            if(list.size()>=6)
            {
               out.println("YES");
                
                
                    int m = list.size();
                    int a1 = list.get(m-1);
                    int b1 = list.get(m-2)*list.get(m-3);
                    int c1 =1;
                    for(int i=0;i<(m-3);i++)
                        c1 *= list.get(i);
                    out.println(a1+" "+b1+" "+c1);
                
                
                
            }
            else if(count>=2)
            {
                int a = res[0];
                int b = res[1];
                // System.out.println(a+" "+b);
                if(n1%(a*b)==0 && (n1/(a*b)) !=a && (n1/(a*b)) !=b && (n1/(a*b)) !=1)
                {
                    out.println("YES");
                    out.println(a+" "+b+" "+(n1/(a*b)));
                }
                else out.println("NO");
            }
            else out.println("NO");

        }
        out.close();

    }
   


    interface Input {
        public String next();
        public String nextLine();
        public int nextInt();
        public long nextLong();
        public double nextDouble();
    }
    static class StdIn implements Input {
        final private int BUFFER_SIZE = 1 << 16;
        final private int STRING_SIZE = 1 << 11;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
 
        public StdIn() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
        
        public StdIn(String filename) {
            try{
                din = new DataInputStream(new FileInputStream(filename));
            } catch(Exception e) {
                throw new RuntimeException();
            }
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
        
        public String next() {
            byte[] buf = new byte[STRING_SIZE]; // string length
            int cnt = 0, c;
            while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
            while (c != -1)
            {
                if (c == ' ' || c == '\n'||c=='\r')
                    break;
                buf[cnt++] = (byte) c;
                c=read();
            }
            return new String(buf, 0, cnt);
        }
 
        public String nextLine() {
            byte[] buf = new byte[STRING_SIZE]; // line length
            int cnt = 0, c;
            while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
            while (c != -1)
            {
                if (c == '\n'||c=='\r')
                    break;
                buf[cnt++] = (byte) c;
                c = read();
            }
            return new String(buf, 0, cnt);
        }
 
        public int nextInt() {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
 
            if (neg)
                return -ret;
            return ret;
        }
        
        public int[] readIntArray(int n) {
            int[] ar = new int[n];
            for(int i=0; i<n; ++i)
                ar[i]=nextInt();
            return ar;
        }
 
        public long nextLong() {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
 
        public double nextDouble() {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
 
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
 
            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
 
            if (neg)
                return -ret;
            return ret;
        }
 
        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
 
        private byte read() {
            try{
                if (bufferPointer == bytesRead)
                    fillBuffer();
                return buffer[bufferPointer++];
            } catch(IOException e) {
                throw new RuntimeException();
            }
        }
 
        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }
    private static StdIn fs = new StdIn();
 
   
}