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

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &u) {
  u = 0;
  char c = getchar();
  long long flag = 0;
  while (c < '0' || c > '9') flag |= (c == '-'), c = getchar();
  while (c >= '0' && c <= '9')
    u = (u << 3) + (u << 1) + (c ^ 48), c = getchar();
  if (flag) u = -u;
}
template <class T>
void write(T u) {
  if (u < 0) printf("-"), u = -u;
  if (u < 10)
    putchar(48 + u);
  else
    write(u / 10), putchar(48 + u % 10);
}
void write(char u) { putchar(u); }
template <class T, class... Arg>
void read(T &u, Arg &...v) {
  read(u);
  read(v...);
}
template <class T, class... Arg>
void write(T u, Arg... v) {
  write(u);
  write(v...);
}
template <class T>
bool checkmin(T &a, T b) {
  return (b < a ? a = b, 1 : 0);
}
template <class T>
bool checkmax(T &a, T b) {
  return (b > a ? a = b, 1 : 0);
}
template <class T>
T _min(T a, T b) {
  return (a < b ? a : b);
}
template <class T>
T _max(T a, T b) {
  return (a > b ? a : b);
}
const long long N = 100005;
vector<pair<long long, long long> > v;
long long n;
void fac(long long n) {
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      long long tmp = 0;
      while (n % i == 0) n /= i, ++tmp;
      v.push_back(make_pair(i, tmp));
    }
  }
  if (n > 1) v.push_back(make_pair(n, 1));
}
void init() {
  scanf("%lld", &n);
  v.clear();
  fac(n);
}
void solve() {
  if ((long long)v.size() >= 3) {
    long long p = n;
    puts("YES");
    for (long long i = 0; i < 2; ++i) {
      long long tmp = 1;
      for (long long j = 1; j <= v[i].second; ++j) {
        tmp *= v[i].first;
      }
      p /= tmp;
      write(tmp, ' ');
    }
    write(p, '\n');
    return;
  }
  if ((long long)v.size() == 1) {
    if (v[0].second < 6)
      printf("NO\n");
    else {
      long long t = v[0].first;
      printf("YES\n");
      write(t, ' ', t * t, ' ', n / t / t / t, '\n');
    }
  } else {
    long long a = v[0].first, b = v[1].first, c = n / a / b;
    if (a != b && b != c && c != a && c >= 2 && a >= 2 && b >= 2) {
      printf("YES\n%lld %lld %lld\n", a, b, c);
    } else
      printf("NO\n");
  }
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    init();
    solve();
  }
  return 0;
}