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:
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        boolean[] arr = new boolean[32000];
        for(int i=4;i<32000;i+=2) {
            arr[i] = true;
        }
        for(int i=3;i*i<32000;i+=2) {
            if(!arr[i]) {
                for(int j=i+i;j<32000;j+=i) {
                    arr[j] = true;
                }
            }
        }

        int t = scan.nextInt();
        while (t-- > 0) {
            int n = scan.nextInt();
            int pnt = 2;
            int cnt = 0;
            LinkedList<Integer> ans = new LinkedList<>();
            while (n > 1 && pnt < 32000) {
                if(!arr[pnt]) {
                    if(n % pnt == 0) {
                        n /= pnt;
                        ans.add(pnt);
                        cnt++;
                        if(cnt > 5) {
                            break;
                        }
                    } else {
                        pnt++;
                    }
                } else {
                    while (pnt < 32000 && arr[pnt]) {
                        pnt++;
                    }
                }
            }

            if(n > 1) {
                ans.add(n);
            }

            if(ans.size() < 3) {
                System.out.println("NO");
                continue;
            }

            int diff = 1;
            int now = ans.get(0);
            for(int i=1;i<ans.size();i++) {
                if(now != ans.get(i)) {
                    diff++;
                }
                now = ans.get(i);
            }

            if((diff == 1 && ans.size() < 6) || (diff == 2 && ans.size() < 4)) {
                System.out.println("NO");
                continue;
            }
            System.out.println("YES");
            if(diff >= 3) {
                System.out.print(ans.get(0)+" ");
                int i = 1;
                int loc = 1;
                while (i < ans.size()-1) {
                    loc *= ans.get(i);
                    i++;
                }
                System.out.println(loc+" "+ans.get(ans.size()-1));
                continue;
            }
            if(diff == 2) {
                System.out.print(ans.get(0)+" ");
                int loc = 1;
                for(int i=1;i<ans.size()-1;i++) {
                    loc *= ans.get(i);
                }
                System.out.println(loc+" "+ans.get(ans.size()-1));
                continue;
            }

            //diff 1
            System.out.print(ans.get(0)+" ");
            int loc = 1;
            int i = 3;
            while (i < ans.size()) {
                loc *= ans.get(i);
                i++;
            }
            System.out.println(ans.get(1)*ans.get(2)+" "+loc);
        }

    }


}