#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 5;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
int t;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v = {6, 10, 14, 15, 21, 22, 26, 33, 34};
    vector<int> ans(4);
    for (int i = 0; i < 9; i++) {
      for (int j = i + 1; j < 9; j++) {
        for (int k = j + 1; k < 9; k++) {
          int rem = n - v[i] - v[j] - v[k];
          if (rem <= 0 || rem == v[i] || rem == v[j] || rem == v[k]) continue;
          ans[0] = v[i];
          ans[1] = v[j];
          ans[2] = v[k];
          ans[3] = rem;
        }
      }
    }
    if (ans[0] == 0)
      cout << "NO\n";
    else {
      cout << "YES\n";
      for (int i = 0; i < 4; i++) cout << ans[i] << " ";
      cout << "\n";
    }
  }
  return 0;
}
