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.io.*;
import java.util.*;
import java.util.stream.Collectors;

public class check4  {

    public static void primeFactors(long n,Map<Long,Long> hm)
    {
        // Print the number of 2s that divide n

        long two_c=0;
        if(n%2==0)
        {
            while (n%2==0)
            {
                two_c+=1;
                n /= 2;
            }
            hm.put(2L,two_c);
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2)
        {
            long temp1=0;
            // While i divides n, print i and divide n
            if(n%i==0)
            {
//                System.out.println(i);
                while (n%i == 0)
                {
                    temp1+=1;
                    n /= i;
                }
                hm.put(i,temp1);
            }
        }
        if(n>2)
        {
            hm.put(n,1L);
        }
    }
    public static class pair
    {
        long a,b;
        pair(long l1,long l2)
        {
            a=l1;
            b=l2;
        }
    }
    public static List<Long> find(long no)
    {
        List<Long> ans=new ArrayList<>();

        if(isprime(no))
        {
//            System.out.println("prine");
            ans.add(no);
            return ans;
        }
        Map<Long,Long> hm=new HashMap<>();
        primeFactors(no,hm);

        List<pair> al=new ArrayList<>();

        for(Map.Entry<Long,Long> mp:hm.entrySet())
        {
            long key=mp.getKey();
            long val=mp.getValue();

            al.add(new pair(key,val));
        }
//        .System.out.println(hm);
        Collections.sort(al, new Comparator<>() {
            @Override
            public int compare(pair o1, pair o2) {
                long l1 = o2.b-o1.b;

                if(l1<0) return -1;
                if(l1>0) return 1;
                return 0;
            }
        });

        long primes[]=new long[al.size()];
        long freq[]=new long[al.size()];
        long val[]=new long[al.size()];

        for(int i=0;i<al.size();i++)
        {
            primes[i]=al.get(i).a;
            freq[i]=al.get(i).b;
        }
        long temp=1;

        for(int i=0;i<primes.length;i++)
        {
            temp*=primes[i];
            val[i]=temp;
        }

        int n1=val.length;
        long sub=0;
        for(int i=n1-1;i>=0;i--)
        {
            long t1=freq[i]-sub;
            sub=freq[i];

            while(t1>0)
            {
                ans.add(val[i]);
                t1--;
            }
        }

        return ans;
    }
    public static void main(String[] args) throws IOException{

        Reader sc=new Reader();
        PrintWriter out = new PrintWriter(System.out);
        int t=sc.nextInt();

        while(t-->0)
        {
            long no=sc.nextLong();
            List<Long> al = find(no);
            Collections.reverse(al);

            out.println(al.size());
            for(int i=0;i<al.size();i++)
            {
                out.print(al.get(i)+" ");
            }
            out.println();



        }
        out.flush();
    }

    public static long power(long x,long power)
    {
        if(power==0) return 1;

        long ans1 = power(x,power/2);
        ans1=ans1*ans1;

        if(power%2==0) return ans1;
        return x*ans1;
    }

    //    (a*a_inverse) = 1(mod m)
//    finding a_inverse
    public static long modInverse(long a,long m)
    {
//        works only when m is prime
        long g=gcd(a,m);
        if(g==1) return power(a,m-2,m);
        else return -1;
    }

    //    (x^power)mod(m)
    public static long power(long x,long power,long m)
    {
        if(power==0) return 1;

        long p = power(x,power/2,m)%m;
        p = (p*p)%m;

        if(power%2==0) return p;
        return (x*p)%m;
    }
    public static long gcd(long small,long large)
    {
        if(small==0) return large;
        return gcd(large % small,small);
    }

    public static boolean isprime(long no)
    {
        if(no<=1) return false;
        if(no<=3) return true;
        if(no%2==0 || no%3==0) return false;
        // 6k+1 6k+5 can be prime
        for(long i=5;i*i<=no;i+=6)
        {
            if(no%(i)==0 || no%(i+2)==0)
                return false;
        }
        return true;
    }

    //    prime no smaller than or equal to n
    public static boolean[] prime_nos_till_no(int no)
    {
        boolean prime[]=new boolean[no+1];
//        prime[i]== true means prime
//        prime[i]== false means not a prime
//        initialize prime array as true

        Arrays.fill(prime,true);
        prime[0]=false;
        for(int i=2;i*i<=no;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=no;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
        return prime;

    }
    public static void shufflearray(long arr[])
    {


        int n=arr.length;
        Random rand=new Random();
        for(int i=0;i<n;i++)
        {
            long temp=arr[i];
            int randomPos=i+rand.nextInt(n-i);
            arr[i]=arr[randomPos];
            arr[randomPos]=temp;
        }
    }
    //       Arrays.sort(arr, new Comparator<pair>() {
//        //@Override
//        public int compare(pair o1, pair o2) {
//            long l1=o1.a-o2.a;
//            if(l1<0L) return -1;
//            if(l1==0) return 0;
//            return 1;
//        }
//    });
    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String nextLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() throws IOException{
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }


        public int nextInt() throws IOException {
            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 long nextLong() throws IOException {
            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() throws IOException {
            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() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }

    }

}