#include <bits/stdc++.h>   using namespace std;   int main() {     int t;     cin >> t;     while (t--) {       long long n;       cin >> n;       set<int> used;       for (int i = 2; i * i <= n; i++) {         if (n % i == 0 && !used.count(i)) {           used.insert(i);           n /= i;           break;         }       }       for (int i = 2; i * i <= n; i++) {         if (n % i == 0 && !used.count(i)) {           used.insert(i);           n /= i;           break;         }       }       if (used.size() < 2 || used.count(n) || n == 1) {         cout <<  NO  << endl;       } else {         cout <<  YES               <<   n ;         used.insert(n);         for (auto it : used) cout << it <<    ;         cout << endl;       }     }   }   