#include <bits/stdc++.h>
using namespace std;
long long int minf = numeric_limits<long long int>::min();
long long int inf = numeric_limits<long long int>::max();
const long long int N = 500007;
const long long int MOD = 100000007;
void sol() {
  vector<long long int> v1, v2, ans;
  long long int t = 0, n = 0, a = 0, b = 0, c = 0, d = 0, k = 0, f = 0, m = 0,
                r = 0, mi = inf, ma = minf;
  cin >> n;
  if (n > 30) {
    if ((n - 30 != 6) && (n - 30 != 10) && (n - 30 != 14)) {
      cout << "YES";
      cout << "\n";
      cout << 6 << " " << 10 << " " << 14 << " " << n - 30;
    } else {
      cout << "YES";
      cout << "\n";
      cout << 6 << " " << 10 << " " << 15 << " " << n - 31;
    }
  } else
    cout << "NO";
}
int main() {
  long long int t = 1;
  cin >> t;
  while (t--) {
    sol();
    cout << "\n";
    ;
  }
  return 0;
}
