#include <bits/stdc++.h>
using namespace std;
using namespace std;
int min1(int a, int b) { return (a < b) ? a : b; }
int max1(vector<int> arr, int n) {
  int i, max = arr[0];
  for (i = 0; i < n; i++) {
    if (arr[i] > max) max = arr[i];
  }
  return max;
}
bool isPrime(int n) {
  for (int i = 2; i < n / 2; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int t;
  cin >> t;
  ;
  while (t--) {
    int n;
    cin >> n;
    ;
    if (n < 31) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    n -= 30;
    if (n != 6 && n != 10 && n != 14)
      cout << n << " "
           << "6"
           << " "
           << "10"
           << " "
           << "14"
           << " " << endl;
    else {
      cout << --n << " "
           << "6"
           << " "
           << "10"
           << " "
           << "15" << endl;
    }
  }
}
