#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int x;
    cin >> x;
    if (x <= 30) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      if (x - 30 == 6) {
        printf("%d %d %d %d\n", 6, 10, 15, 5);
      } else if (x - 30 == 10) {
        printf("%d %d %d %d\n", 6, 14, 15, 5);
      } else if (x - 30 == 14) {
        printf("%d %d %d %d\n", 6, 10, 15, 13);
      } else {
        printf("%d %d %d %d\n", 6, 10, 14, x - (30));
      }
    }
  }
  return 0;
}
