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 CPP):

Solution:
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
//#include <boost/lexical_cast.hpp>
using namespace std;
  #define ll  long long
    #define rep(i,n) for(ll i=0;i<n;i++)
    #define pb push_back
    #define in insert
    #define pll pair<ll,ll>
    #define mll map<ll,ll>
    #define si set<ll>
    #define sc set<char>
    #define msi multiset<ll>
    #define msc multiset<char>
    #define nokay cout<<(ok?"YES\n":"NO\n");

    
   // #define bs  binary_search
    #define rep1(x,n) for(ll x=n-1;x>=0;x--) 
    #define for1(i,a,n) for(ll i=a;i<n;i++)
    #define for2(i,a,n) for(ll i=n-1;i>=a;i--)
    #define F1 first
    #define S2 second
    #define vi vector<ll>
    #define vii vector<vector<ll>>
    #define vpi vector<pll>
    #define SORT(x) sort(x.begin(),x.end())
    #define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
    #define All(x) (x).begin(),(x).end()
    #define rAll(x) (x).rbegin(),(x).rend()
    #define db  double
    #define S size()
    #define EN end()
    #define BE begin()
    #define LEN length()
    #define itr(s) for(auto x:s)
    #define srt(x)  sort(x,x+n)

    
    const ll MAX=1e18+1;
    
    const double pi=3.1415926535897932384626433832;
    const ll M=1e9 +7;
    ll bis(ll a[],ll l,ll r,ll x){
     while(l<=r){
      ll m=l +(r-l)/2;
      if(a[m]==x)
      return m;
      if(a[m]<x)l=m+1;
      else r=m-1;
     }
     return -1;
    }
    
    ll gcd(ll x,ll y){
        if(x==0)return y;
        else return gcd(y%x,x);
    }
    ll lcm(ll x,ll y){
        return (x*y)/gcd(x,y);
    }
   
bool isPrime(ll n) 
{  
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (ll i = 5; i * i <= n; i = i + 6){ 
        if (n % i == 0 || n % (i + 2) == 0){ 
            return false; 
        }
    }
    return true; 
} 
bool pdrome(string s){
    ll n = s.length();
    for(ll i=0;i<n/2;i++){
        if(s[i]!=s[n-i-1]){
            return false;
        }
    }
    return true;
}
string need(string s){
    string a=s;
    reverse(a.begin(),a.end());
    a=s+'?'+a;
    ll n=a.size();
    ll pref[n];
    memset(pref,0,sizeof(pref));
    //ll len=0;
    for1(i,1,n+1){
        ll len=pref[i-1];
         while(len>0&&a[len]!=a[i])len=pref[len-1];
         if(a[i]==a[len])len++;
         pref[i]=len;
    }
    //cout<<pref[n-1];
    return a.substr(0,pref[n-1]);
}

ll mindig(ll x){
    ll ans = 9;
    ll t = x;
    while(x){
        ans = min(ans,x%10);
        x/=10;
    }
    x = t;
    return ans;
}
ll maxdig(ll x){
    ll ans = 0;
    ll t = x;
    while(x){
        ans = max(ans,x%10);
        x/=10;
    }
    x = t;
    return ans;
}
ll modpow(ll x,ll n,ll M){
    if(n==0)return 1%M;
    ll u=modpow(x,n/2,M);
    u=(u*u)%M;
    if(n%2==1)u=(u*x)%M;
    return u;

}
ll sumdigits(ll a) {
    ll result = 0;
    while (a > 0) {
        result += a % 10;
        a /= 10;
    }
    return result;
}
ll digits(long long n) 
{ 
    return floor(log10(n) + 1); 
}
const ll Node=1e5+7;
vi adj[Node];
bool vis[Node]={false};
void addedge(ll u,ll v){
    adj[u].pb(v);
    adj[v].pb(u);
}
void bfs(ll u){
    vis[u]=true;
    list<ll>q;
    q.pb(u);
    while(!q.empty()){
        //cout<<q.front()<<" ";
        q.pop_front();
        for(auto x:adj[u]){
            if(!vis[x]){
                vis[x]=true;
                q.pb(x);
            }
        }
    }
}
void dfs(ll u){
    vis[u]=true;
    cout<<u<<" ";
    
    itr(adj[u]){
        if(!vis[x]){
        
        //cnt++;
        dfs(x);
        }
    }

}
ll con1(string s){
    long long res=0;
    stringstream geek(s); 
    geek>>res;
    return res;
    
}
string con2(ll num){
    
    string stri=to_string(num);
    return stri;   
}
ll countbits(ll k){
    ll cnt=log2(k);
    return cnt;

}
ll ncr (ll n,ll r){
  ll ans=1,cnt=1;
  for(ll x=n;x>=r;x--){
    ans=(ans*x)%M;
    ans=(ans/cnt)%M;
    ans=ans%M;
    cnt++;
  }
  return ans;

}
ll modInverse(ll a, ll m) 
{ 
    ll m0 = m; 
    ll y = 0, x = 1; 
  
    if (m == 1) 
        return 0; 
  
    while (a > 1) { 
        // q is quotient 
        ll q = a / m; 
        ll t = m; 
  
        // m is remainder now, process same as 
        // Euclid's algo 
        m = a % m, a = t; 
        t = y; 
  
        // Update y and x 
        y = x - q * y; 
        x = t; 
    } 
  
    // Make x positive 
    if (x < 0) 
        x += m0; 
  
    return x; 
} 




void solve()
{   
   ll n;
   cin>>n;
   if(isPrime(n)){
    cout<<1<<endl;
    cout<<n<<endl;
   }
   else{
    ll n1=n;vi v,v1;map<ll,ll>mp;
    ll ans=0,pprime=-1;
    for1(i,2,sqrt(n) +1){
    if(isPrime(i)){
        ll k=n1;
        while(n1%i==0){
            n1/=i;
            mp[i]++;

        }
        
        if(mp[i]>0){
            
            v.pb(i);

        }
        if(mp[i]>0&&mp[i]>=ans){
            ans=mp[i];
            pprime=i;
        }

    }


    }
    if(isPrime(n1)){
            mp[n1]++;
            v.pb(n1);
        }
    //cout<<v.size()<<endl;
    vi a(ans,1);
    for1(i,0,v.size()){
        for(ll j=ans-1;j>=ans-mp[v[i]];j--){
            a[j]*=v[i];
        }
    }
    cout<<ans<<endl;
    for1(i,0,ans){
        cout<<a[i]<<" ";
    }
   
    
    cout<<endl;


   }
 
}
   
int main(){
        
        #ifndef ONLINE_JUDGE
               freopen("input.txt","r",stdin);
               freopen("output.txt","w",stdout);
               freopen("error.txt","w",stderr);
               #endif
               ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
      ll t=1;
    
 cin>>t;
    
      while(t--){
         
           solve();
      } 
      
        return 0;
}