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.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.HashSet;

public class ProductofThreeNumbers {
	static boolean[] isPrime;
	static ArrayList<Integer> primes;

	static void sieve(int N) {
		isPrime = new boolean[N + 1];
		Arrays.fill(isPrime, true);
		isPrime[0] = false;
		isPrime[1] = false;
		for (int i = 2; i * i <= N; i++) {
			if (isPrime[i]) {
				for (int j = i * i; j <= N; j += i) {
					isPrime[j] = false;
				}
			}
		}
		for (int i = 2; i < isPrime.length; i++) {
			if (isPrime[i])
				primes.add(i);
		}
	}

	static ArrayList<Integer> primeFactors(int N){ //O(sqrt(N)/log(sqrt(N))
		int idx = 0;
		int p = primes.get(idx++);
		ArrayList<Integer> factors = new ArrayList<Integer>();
		while(p*p <= N) {
			while(N % p == 0) {
				factors.add(p);
				N /= p;
			}
			p = primes.get(idx++);
		}
		if(N != 1)
			factors.add(N);
		
		return factors;
	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		int t = Integer.parseInt(br.readLine());
		isPrime=new boolean[100000];
		primes=new ArrayList<Integer>();
		sieve(100000);
		//int counter=;
		while(t-->0) {
		
			int n=Integer.parseInt(br.readLine());
			//out.println(n);
			ArrayList<Integer> a=primeFactors(n);
			HashSet<Long> h=new HashSet();
			//System.out.println(a);
			if(a.size()>3) {long number=1;
				h.add(a.get(0)*1l);
				if(a.get(1)==a.get(0)) {
				h.add(a.get(1)*a.get(2)*1l);
				for(int i=3;i<a.size();i++)
					number*=a.get(i);
				}
				else {
					h.add(a.get(1)*1l);
					for(int i=2;i<a.size();i++)
						number*=a.get(i);
				}
				
			
				h.add(number);
				if(h.size()==3) {
					out.println("YES");
					for(long l:h) {
						out.print(l+" ");
					}
					out.println();
				}
				else {
					out.println("NO");
				}
			}
			else if(a.size()==3) {
				h.add(a.get(0)*1l);h.add(a.get(1)*1l);h.add(a.get(2)*1l);
				if(h.size()==3) {
					out.println("YES");
					for(long l:h) {
						out.print(l+" ");
					}
					out.println();
				}
				else {
					out.println("NO");
				}
					
			}
			else {
			out.println("NO");
			}
			
		}
		out.flush();
	}

}