Problem: You are given an integer n (n > 1).

Your task is to find a sequence of integers a_1, a_2, …, a_k such that:

  * each a_i is strictly greater than 1; 
  * a_1 ⋅ a_2 ⋅ … ⋅ a_k = n (i. e. the product of this sequence is n); 
  * a_{i + 1} is divisible by a_i for each i from 1 to k-1; 
  * k is the maximum possible (i. e. the length of this sequence is the maximum possible). 



If there are several such sequences, any of them is acceptable. It can be proven that at least one valid sequence always exists for any integer n > 1.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 5000) — the number of test cases. Then t test cases follow.

The only line of the test case contains one integer n (2 ≤ n ≤ 10^{10}).

It is guaranteed that the sum of n does not exceed 10^{10} (∑ n ≤ 10^{10}).

Output

For each test case, print the answer: in the first line, print one positive integer k — the maximum possible length of a. In the second line, print k integers a_1, a_2, …, a_k — the sequence of length k satisfying the conditions from the problem statement.

If there are several answers, you can print any. It can be proven that at least one valid sequence always exists for any integer n > 1.

Example

Input


4
2
360
4999999937
4998207083


Output


1
2 
3
2 2 90 
1
4999999937 
1
4998207083 

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
import java.util.ArrayList;
import java.math.BigInteger;
public class MyClass {
static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
    
     public static ArrayList<Long> primeFactorize(long n) {
        ArrayList<Long> primeFactors = new ArrayList<Long>();
        
        long primeFactor = 0L;

        for (long i = 2L; i <= n / i; ) { // smallest prime factor to the square root of n (largest possible factor of n)
            if (n % i == 0) { // the prime number i is a factor of n (i will never go into n if it's composite since the prime factor of that compositite number would have already been tested)
                primeFactor = i; // therefore, this is a prime factor of n
                primeFactors.add(primeFactor);
                n /= i; // divide out that prime factor from n to get the rest of the prime factors
                // don't increment i: test if this same prime factor goes into n multiple times (e.g. 18 = 2*3*3)
            } else {
                i++; // i is not a prime factor of n, so increment
            }
        }
        
        if (primeFactor < n) { // n had no more prime factors, so n is a prime factor
            primeFactors.add(n);
        } else { // n was divided down to 1, meaning that the last prime factor divided itself out. therefore, it is the last prime factor
            primeFactors.add(primeFactor);
        }
        
        return primeFactors;
    }
    
    /**
     * Reduces the parameter n into a product of only prime numbers
     * and returns a list of those prime number factors as BigIntegers.
     * 
     * @param  n  the number to prime factorize
     * @return an ArrayList (of BigIntegers) of only prime factors of the parameter n
     */
    public static ArrayList<BigInteger> primeBigFactorize(BigInteger n) {
        ArrayList<BigInteger> primeFactors = new ArrayList<BigInteger>();
        BigInteger primeFactor = BigInteger.ZERO;
    
        for (BigInteger i = new BigInteger("2"); i.compareTo(n.divide(i)) <= 0; ) {
            if (n.mod(i).longValue() == 0) {
                primeFactor = i;
                primeFactors.add(primeFactor);
                n = n.divide(i);
            } else {
                i = i.add(BigInteger.ONE);
            }
        }
        
        if (primeFactor.compareTo(n) < 0) {
            primeFactors.add(n);
        } else {
            primeFactors.add(primeFactor);
        }
        
        return primeFactors;
    }
    
    public static void main(String args[]) 
{
	FastReader s=new FastReader();int t=0,ind=0,frequ=0,max=0,rows=0;String n="",ans="";long l1=0,element=0,prod=1;
     //Scanner in=new Scanner(System.in);
     //if(in.hasNext())
     t=s.nextInt();
	int calc=0;
     for(int j1=0;j1<t;j1++)
     {
      //   if(in.hasNext())
         n=s.next();
         ArrayList<BigInteger> al2=new ArrayList<>();
         al2=primeBigFactorize(new BigInteger(n)) ;
         
        ArrayList<Long> al=new ArrayList<>();
        for(int i=0;i<al2.size();i++)
        {
            BigInteger ele=al2.get(i);
           l1 = ele.longValue();
           al.add(l1);
        }
        //System.out.println(al);
         HashMap<Long,Integer> freq=new HashMap<>();
         max=0;
         HashSet<Long> set=new HashSet<>();
         for(int i=0;i<al.size();i++)
         {
             long ele=al.get(i);
             set.add(ele);
             if(freq.containsKey(ele))
             {
                 freq.put(ele,freq.get(ele)+1);
             }
             else
             freq.put(ele,1);
             if(freq.get(ele)>max)
             max=freq.get(ele);
         }
         //System.out.println(freq);
         rows=set.size();
         long mat[][]=new long[rows][max];
         
         ind=0;
	 int abcd=0;
         
         for( Map.Entry<Long,Integer> entry : freq.entrySet() )
         {
            element=entry.getKey();
            frequ=entry.getValue();
            long array[]=new long[max];
            Arrays.fill(array,0,frequ,element);
            mat[ind]=array;
           // System.out.println( "ind="+ind+" "+Arrays.toString(mat[ind]) );
            ind++;
                
         }
         
         
         ans="";
         for(int i=0;i<max;i++)
         {
             prod=1;
             for(int j=0;j<rows;j++)
             {
                 if(mat[j][i]!=0)
                 prod*=mat[j][i];
             }
             ans=" "+Long.toString(prod)+ans; 
         }
         ans=ans.trim();
         System.out.println(max);
         System.out.println(ans);
         
     }
    }
}