#include <bits/stdc++.h>
using namespace std;
int primes[1000005];
vector<long long> vector_primes;
void sieve() {
  for (long long i = 0; i <= 1000005; i++) {
    primes[i] = 0;
  }
  for (long long i = 2; i <= 1000005; i++) {
    for (long long j = i * 2; j <= 1000005; j += i) {
      primes[j] = primes[j] + 1;
      if (primes[j] == 2) vector_primes.push_back(j);
    }
  }
}
vector<int> primefactorisation(long long n) {
  vector<int> v;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        v.push_back(i);
        n = n / i;
      }
    }
  }
  return v;
}
unsigned long long factorial(int n) {
  return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
}
long long gcd(long long n, long long sum) {
  return sum == 0 ? n : gcd(sum, n % sum);
}
long long power(unsigned long long base, long long exp) {
  if (exp == 0) return 1;
  if (exp == 1) return base;
  long long t = power(base, exp / 2);
  t = (t * t);
  if (exp % 2 == 0)
    return t;
  else
    return (base * t);
}
void inversion(int *arr, int k, int count) {
  int temp = count;
  for (int i = temp; i > k + 1; i--) {
    arr[i] = arr[i - 1];
  }
  arr[k] = 1;
  arr[k + 1] = 0;
}
void solve() {
  long long n;
  cin >> n;
  if (n < 31)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    if (n - 30 == 6) {
      cout << "5 6 10 15" << endl;
    } else if (n - 30 == 10) {
      cout << "6 9 10 15" << endl;
    } else if (n - 30 == 14) {
      cout << "6 10 13 15" << endl;
    } else
      cout << "6 10 14 " << n - 30 << endl;
  }
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
