#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int x = 6 + 10 + 14;
    if (n <= x) {
      cout << "No\n";
    } else {
      cout << "Yes\n";
      if (n - x == 6) {
        cout << 6 << " " << 10 << " " << 15 << " " << 5 << "\n";
      } else if (n - x == 10) {
        cout << 6 << " " << 10 << " " << 15 << " " << 9 << "\n";
      } else if (n - x == 14) {
        cout << 6 << " " << 10 << " " << 15 << " " << 13 << "\n";
      } else {
        cout << 6 << " " << 10 << " " << 14 << " " << n - x << "\n";
      }
    }
  }
  return 0;
}
