#include<stdio.h>
#include <map>
#include <stack>
#include <queue>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    scanf("%d",&n);
    string winer="";
    int ss=0;
    for(int i=0;i<n;i++)
    {
		string name;
		int p,m,a,b,c,d,e,score;
		cin>>name>>p>>m>>a>>b>>c>>d>>e;
        score=p*100-m*50+a+b+c+d+e;
        if(score>ss)
        {
            ss=score;
            winer=name;
        }
    }
	cout<<winer;
}


#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

const int N = 55;

struct Pant
{
    string name;
    int score;
}pant[N];

int n;

bool cmp(Pant a, Pant b)
{
    return a.score > b.score;
}
int main()
{
    cin >> n;
    for (int i = 0; i < n; i ++ )
    {
        cin >> pant[i].name;
        int score = 0, tmp;
        cin >> tmp;
        score += tmp * 100;
        cin >> tmp;
        score -= tmp * 50;
        for (int i = 0; i < 5; i ++ )
        {
            cin >> tmp;
            score += tmp;
        }
        pant[i].score = score;
    }

    sort(pant, pant + n, cmp);
    cout << pant[0].name << endl;

    // system("pause");
    return 0;
}


#include<cstdio>
#include<iostream>
#include<string>
using namespace std;
const int maxn= 50;
int n,pl,a[maxn],b[maxn],c[maxn],d[maxn],e[maxn],mi,now;
string handle,ans;
int main()
{
	scanf("%d",&n);
	for(register int i=1;i<=n;i++)
	{
		cin>>handle;
		scanf("%d%d%d%d%d%d%d",&pl,&mi,&a[i],&b[i],&c[i],&d[i],&e[i]);
		if(pl*100-mi*50+a[i]+b[i]+c[i]+d[i]+e[i]>now)
		{
			now=pl*100-mi*50+a[i]+b[i]+c[i]+d[i]+e[i];
			ans=handle;
		}
	}
	cout<<ans;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#define sc store[i].score
#define LL long long
using namespace std;
struct per
{
	string name;
	int score;
}store[55];
bool cmp(per a,per b)
{
	return a.score>b.score;
}
int main()
{
	int n,tmp;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>store[i].name;
		cin>>tmp;
		sc=0;
		sc+=tmp*100;
		cin>>tmp;
		sc-=tmp*50;
		for(int j=0;j<5;j++)
		{
			cin>>tmp;
			sc+=tmp;
		}
	}
	sort(store,store+n,cmp);
	cout<<store[0].name<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
inline int read()
{
	int t = 0;
	char ch = getchar();
	while (ch < '0' || ch>'9')
	{
		ch = getchar();
	}
	while (ch >= '0' && ch <= '9')
	{
		t = (t << 3) + (t << 1) + (ch ^ 48);
		ch = getchar();
	}
	return t;
}
inline void write(int t)
{
	if (t > 9)
	{
		write(t / 10);
	}
	putchar(t % 10 + 48);
}
typedef struct
{
	char ch[105];
	int suc, unsuc;
	int point;
}contestant;
contestant con[55];
int n;
bool cmp(contestant a, contestant b)
{
	return a.point > b.point;
}
int main()
{
	n = read();
	for (int i = 0; i < n; i++)
	{
		scanf("%s", con[i].ch);
		con[i].suc = read();
		con[i].unsuc = read();
		con[i].point = con[i].suc * 100 - con[i].unsuc * 50;
		for (int j = 0; j < 5; j++)
		{
			con[i].point += read();
		}
	}
	sort(con, con + n, cmp);
	printf("%s\n", con[0].ch);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const int N=1e5+10;
const ll inf=0x7fffffff;

int n;
struct node{
	string name;
	ll score;
}s[N];

int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>s[i].name;
		ll x,y,a,b,c,d,e;
		cin>>x>>y>>a>>b>>c>>d>>e;
		ll ans=x*100-y*50+a+b+c+d+e;
		s[i].score=ans;
	}
	string l="";
	ll mx=-inf;
	for(int i=1;i<=n;i++){
		if(s[i].score>mx){
			mx=s[i].score;
			l=s[i].name;
		}
	}
	cout<<l<<endl;
	return 0;
}


#include<stdio.h>
#include <map>
#include <stack>
#include <queue>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    scanf("%d",&n);
    string winer="";
    int ss=0;
    for(int i=0;i<n;i++)
    {
		string name;
		int p,m,a,b,c,d,e,score;
		cin>>name>>p>>m>>a>>b>>c>>d>>e;
        score=p*100-m*50+a+b+c+d+e;
        if(score>ss)
        {
            ss=score;
            win=name;
        }
    }
    printf("%s",win);
}


#pragma GCC optimize ("O3")
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 1e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define F first
#define S second
#define pll pair<ll,ll>
#define mod  998244353
#define pi acos(-1)
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int,null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
template<class T> using ordered_class_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
ll n,a,b,c,d,e,HS,HW,maxx=-OO;
string s,ans;
map<string,ll>mp;
int main()
{
  yalla;
  cin>>n;
  for(int i=0;i<n;i++)
  {cin>>s>>HS>>HW>>a>>b>>c>>d>>e;
   mp[s]+=HS*100;
   mp[s]-=HW*50;
   mp[s]+=a+b+c+d+e;
  }
  auto it=mp.begin();
  while(it!=mp.end())
  {if((it->S)>maxx)
    maxx=it->S,ans=it->F;

   it++;
  }
  cout<<ans<<endl;
  re 0;
}


#pragma GCC optimize ("O3")
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 1e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define F first
#define S second
#define pll pair<ll,ll>
#define mod  998244353
#define pi acos(-1)
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int,null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
template<class T> using ordered_class_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
ll n,a,b,c,d,e,HS,HW,maxx;
string s,ans;
map<string,ll>mp;
int main()
{
  yalla;
  cin>>n;
  for(int i=0;i<n;i++)
  {cin>>s>>HS>>HW>>a>>b>>c>>d>>e;
   mp[s]+=HS*100;
   mp[s]-=HW*50;
   mp[s]+=a+b+c+d+e;
  }
  auto it=mp.begin();
  while(it!=mp.end())
  {if((it->S)>maxx)
    maxx=it->S,ans=it->F;

   it++;
  }
  cout<<ans<<endl;
  re 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string s;
    int p,m,a,b,c,d,e,max=-1;
    string name;
    cin>>n;
     pair<string,int>vec[10000];
    for(int i=0;i<n;i++){
        cin>>s>>p>>m>>a>>b>>c>>d>>e;
        int sum=0;
        sum=p*100-m*50+a+b+c+d+e;

    if(max<=sum){
        max=sum;
        name=s;
    }
    }
    cout<<name;

return 0;}


#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string s;
    int p,m,a,b,c,d,e,max= INT_MIN;
    string name;
    cin>>n;
     pair<string,int>vec[10000];
    for(int i=0;i<n;i++){
        cin>>s>>p>>m>>a>>b>>c>>d>>e;
        int sum=0;
        sum=p*100-m*50+a+b+c+d+e;

    if(max<sum){
        max=sum;
        name=s;
    }
    }
    cout<<name;

return 0;}


#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string s;
    int p,m,a,b,c,d,e,max=-1;
    string name;
    cin>>n;
     pair<string,int>vec[10000];
    for(int i=0;i<n;i++){
        cin>>s>>p>>m>>a>>b>>c>>d>>e;
        int sum=0;
        sum=p*100-m*50+a+b+c+d+e;

    if(max<sum){
        max=sum;
        name=s;
    }
    }
    cout<<name;

return 0;}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

int main()
{
    ll n;
    cin>>n;
    map<string,ll>mp;
    string s;
    ll sh,uh,a,b,c,d,e;

    for(int i=0;i<n;i++)
    {
        cin>>s;
        cin>>sh>>uh>>a>>b>>c>>d>>e;
        mp[s]=(sh*100)-(uh*50)+(a+b+c+d+e);
    }

    ll mx=0;
    string ans;
    for(auto it=mp.begin();it!=mp.end();it++)
    {
        if(mx<=it->second)
        {
            mx=it->second;
            ans=it->first;
        }
    }
    cout<<ans<<"\n";
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

int main()
{
    ll n;
    cin>>n;
    map<string,ll>mp;
    string s;
    ll sh,uh,a,b,c,d,e;

    for(int i=0;i<n;i++)
    {
        cin>>s;
        cin>>sh>>uh>>a>>b>>c>>d>>e;
        mp[s]=(sh*100)-(uh*50)+(a+b+c+d+e);
    }

    ll mx=INT_MIN;
    string ans;
    for(auto it=mp.begin();it!=mp.end();it++)
    {
        if(mx<=it->second)
        {
            mx=it->second;
            ans=it->first;
        }
    }
    cout<<ans<<"\n";
}


#include <bits/stdc++.h>

using namespace std ;

#define sz(v) (int)v.size()
#define ll long long
#define all(v)  v.begin() , v.end()
#define rall(v)  v.rbegin() , v.rend()
#define pf push_front
#define pb push_back
#define fast FastInputOutput() ;
#define Clear( container , value ) memset( container , value , sizeof container )
#define PI acos( -1.0 )
#define forn( v , be , n ) for( int v = be ; v < n ; v++ )
#define se second
#define fr first

//#define c_b fflush(stdin);

int dx[ ] = { 0 , 1 , -1 , 0 , 1 , -1 , -1 , 1 } ;
int dy[ ] = { 1 , 0 , 0 , -1 , 1 , -1 , 1 , -1 } ;
string dim[ ] = { "R" , "D" , "U" , "L" , "RD" , "LU" , "RU" , "LD" } ;

void File_input( string pathIn ){
    freopen( pathIn.c_str() , "r", stdin ) ;
}

void File_output( string pathOut ){
    freopen( pathOut.c_str() , "w", stdout ) ;
}

int msg(){
    srand( time( 0 ) ) ;
    vector < string > st = {
            "Wish everyone high ratings!",
            "Good luck!",
            "Have fun!",
            "Please, read all the problems!",
            "Go Go fight!" } ;
    cerr << st[ rand() % sz( st ) ] ;
    return 0 ;
}

void FastInputOutput() {
    ios_base :: sync_with_stdio( 0 ) ;
    cin.tie( 0 ) ;
    cout.tie( 0 ) ;
}

ll n , a , b , c , sum ;
string st , ans ;
ll mx = -19999900 ;

int main(){
   fast
   cin >> n ;
   forn( i , 0 , n ){
      cin >> st ;
      cin >> a >> b ;
      sum = 0 ;
      forn( j , 0 , 5 ){
        cin >> c ;
        sum += c ;
      }
      sum += a * 100 ;
      sum -= b * 50 ;

      if( sum > mx ){
         mx = sum ;
         ans = st ;
      }
   }

   cout << ans << "\n" ;

   return 0;
}


import java.util.*;

public class Main {

  private static void solve(int n) {
    int dif = n - 30; // n - 2 * 3 + 2 * 5 + 2 * 7
    if (dif > 0 && dif != 14) {
      System.out.println("YES\n" + 6 + " " + 10 + " " + 14 + " " + dif);
    } else if (dif == 14) {
      System.out.println("YES\n" + 6 + " " + 10 + " " + 15 + " " + dif);
    } else {
      System.out.println("NO");
    }
  }

  public static void main(String[] args) {
    int testCaseCnt = scanner.nextInt();
    for (int i = 0; i < testCaseCnt; i++) {
      int n = scanner.nextInt();
      solve(n);
    }
  }

  private static final Scanner scanner = new Scanner(System.in);
}


import java.util.*;

public class Main {

  private static void solve(int n) {
    int dif = n - 30; // n - 2 * 3 + 2 * 5 + 2 * 7
    if (dif > 0) {
      System.out.println("YES\n" + 6 + " " + 10 + " " + 14 + " " + dif);
    } else {
      System.out.println("NO");
    }
  }

  public static void main(String[] args) {
    int testCaseCnt = scanner.nextInt();
    for (int i = 0; i < testCaseCnt; i++) {
      int n = scanner.nextInt();
      solve(n);
    }
  }

  private static final Scanner scanner = new Scanner(System.in);
}


import java.util.*;

public class Main {

  private static void solve(int n) {
    int dif = n - (2 * 3 + 2 * 5 + 2 * 7);
    if (dif > 0) {
      System.out.println(6 + " " + 10 + " " + 14 + " " + dif);
    } else {
      System.out.println("NO");
    }
  }

  public static void main(String[] args) {
    int testCaseCnt = scanner.nextInt();
    for (int i = 0; i < testCaseCnt; i++) {
      int n = scanner.nextInt();
      solve(n);
    }
  }

  private static final Scanner scanner = new Scanner(System.in);
}


//package hiougyf;
import java.util.*;

public class Main {
	public static void main (String[] args)
	 {
		Scanner sc =new Scanner(System.in);
		int t=sc.nextInt();
		while(t-->0) {
			int n=sc.nextInt();
			if(n<=30)System.out.println("NO");
			else {
				System.out.println("YES");
				if(n-30!=6&&n-30!=10&&n!=14)System.out.println("6 10 14 "+(n-30));
				else {
					System.out.println("6 10 15 "+(n-31));
				}
			}
		}
	}
}


//package hiougyf;
import java.util.*;

public class Main {
	public static void main (String[] args)
	 {
		Scanner sc =new Scanner(System.in);
		int t=sc.nextInt();
		while(t-->0) {
			int n=sc.nextInt();
			if(n<=30)System.out.println("NO");
			else {
				System.out.println("YES");
				if(n-30!=6&&n-30!=10&&n-30!=14)System.out.println("6 10 14 "+(n-30));
				else {
					System.out.println("6 10 15 "+(n-31));
				}
			}
		}
	}
}


import java.util.*;

public class Main {
	public static void main (String[] args)
	 {
		Scanner sc =new Scanner(System.in);
		int t=sc.nextInt();
		while(t-->0) {
			int n=sc.nextInt();
			if(n<=30)System.out.println("NO");
			else {
				System.out.println("YES");
				System.out.println("6 10 14 "+(n-30));
			}
		}
	}
}


public class Main {
	public static void main (String[] args)
	 {
		Scanner sc =new Scanner(System.in);
		int t=sc.nextInt();
		while(t-->0) {
			int n=sc.nextInt();
			if(n<=30)System.out.println("NO");
			else {
				System.out.println("YES");
				if(n-30!=6&&n-30!=10&&n!=14)System.out.println("6 10 14 "+(n-30));
				else {
					System.out.println("6 10 15 "+(n-31));
				}
			}
		}
	}
}


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int y = n;
			int ar[] = { 6, 10, 14, 15, 21 };
			List<Integer> list = new ArrayList<>();
			boolean flag = true;
			for (int i = 0; i < 3; i++) {
				if (n > ar[i]) {
					n = n - ar[i];
					list.add(ar[i]);
				} else {
					flag = false;
					break;
				}
			}
			int g = y - ar[0] - ar[1] - ar[2];
			if (flag == true) {
				System.out.println("YES");
				for (int i = 0; i < 3; i++) {
					int b = list.get(i);
					if (list.get(i) == g) {
						g = ar[3];
						list.set(i, b - 1);
					}
				}
				list.add(g);
				System.out.println(list.get(0) + " " + list.get(1) + " " + list.get(2) + " " + list.get(3));
			} else
				System.out.println("NO");
		}
	}
}


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int y = n;
			int ar[] = { 6, 10, 14, 15 };
			List<Integer> list = new ArrayList<>();
			boolean flag = true;
			for (int i = 0; i < 3; i++) {
				if (n > ar[i]) {
					n = n - ar[i];
					list.add(ar[i]);
				}
				else {
					flag = false;
					break;
				}
			}
			int g = y - ar[0] - ar[1] - ar[2];
			list.add(g);
			if (flag == true) {
			for (int i = 0; i < 3; i++) {
				int b = list.get(i);
				if (list.get(i) == g) {
					int h = list.indexOf(14);
					if (g >= 14) {
						list.set(i, g + 1);
						list.set(3, 13);
						break;
					} else {
						list.set(i, g - 1);
						list.set(h, 15);
					}
				}
			}
			System.out.println("YES");
			System.out.println(list.get(0) + " " + list.get(1) + " " + list.get(2) + " " + list.get(3));
		} else
			System.out.println("NO");
		}
	}
}


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int y = n;
			int ar[] = { 6, 10, 14, 15 };
			List<Integer> list = new ArrayList<>();
			boolean flag = true;
			for (int i = 0; i < 3; i++) {
				if (n > ar[i]) {
					n = n - ar[i];
					list.add(ar[i]);
				}
				else {
					flag = false;
					break;
				}
			}
			int g = y - ar[0] - ar[1] - ar[2];
			list.add(g);
			if (flag == true) {
			for (int i = 0; i < 3; i++) {
				int b = list.get(i);
				if (list.get(i) == g) {
					int h = list.indexOf(14);
					if (g >= 14) {
						list.set(i, g + 1);
						list.set(3, 13);
						break;
					} else {
						list.set(i, g - 1);
						list.set(h, 15);
					}
				}
			}
			System.out.println(list.get(0) + " " + list.get(1) + " " + list.get(2) + " " + list.get(3));
		} else
			System.out.println("NO");
		}
	}
}


import java.util.Scanner;
public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int y = n;
			int ar[] = { 6, 10, 14 };
			boolean flag = true;
			for (int i = 0; i < 3; i++) {
				if (n > ar[i]) {
					n = n - ar[i];
					// System.out.println(n);
				} else {
					flag = false;
					break;
				}
			}
			int g = y - ar[0] - ar[1] - ar[2];
			if (flag == true) {
				System.out.println("YES");
				System.out.println(ar[0] + " " + ar[1] + " " + ar[2] + " " + g);
			} else
				System.out.println("NO");
		}
	}
}


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int y = n;
			int ar[] = { 6, 10, 14, 15, 21 };
			List<Integer> list = new ArrayList<>();
			boolean flag = true;
			for (int i = 0; i < 3; i++) {
				if (n > ar[i]) {
					n = n - ar[i];
					list.add(ar[i]);
				} else {
					flag = false;
					break;
				}
			}
			int g = y - ar[0] - ar[1] - ar[2];
			if (flag == true) {
				System.out.println("YES");
				if (y == 36)
					System.out.println("6 10 15 5");
				else if (y == 44)
					System.out.println("6 10 15 13");
				else
					System.out.println(ar[0] + " " + ar[1] + " " + ar[2] + " " + g);
			} else
				System.out.println("NO");
		}
	}
}


import java.io.*;
import java.math.*;
import java.util.*;

public class cf1388_Div2_A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int t = in.nextInt();
        for ( ; t > 0; t--) {
        	int sum = in.nextInt();
        	if (sum <= (6 + 8 + 10))
        		System.out.println("NO");
        	else {
        		System.out.println("YES");
        		System.out.println(6 + " " + 8 + " " + 10 + " " + (sum - 24));
        	}
        }

        out.close();
    }

    public static void shuffle(int[] arr) {
    	Random rgen = new Random();

    	for (int i = 0; i < arr.length; i++) {
    		int rPos = rgen.nextInt(arr.length);
    		int temp = arr[i];
    		arr[i] = arr[rPos];
    		arr[rPos]=temp;
    	}
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        String next() {
    		while (st == null || !st.hasMoreElements()) {
    			try {
    				st = new StringTokenizer(br.readLine());
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.*;
import java.math.*;
import java.util.*;

public class cf1388_Div2_A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int t = in.nextInt();
        for ( ; t > 0; t--) {
        	int sum = in.nextInt();
        	if (sum <= (6 + 10 + 14))
        		System.out.println("NO");
        	else {
        		System.out.println("YES");
        		System.out.println(6 + " " + 10 + " " + 14 + " " + (sum - (6 + 10 + 14)));
        	}
        }

        out.close();
    }

    public static void shuffle(int[] arr) {
    	Random rgen = new Random();

    	for (int i = 0; i < arr.length; i++) {
    		int rPos = rgen.nextInt(arr.length);
    		int temp = arr[i];
    		arr[i] = arr[rPos];
    		arr[rPos]=temp;
    	}
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        String next() {
    		while (st == null || !st.hasMoreElements()) {
    			try {
    				st = new StringTokenizer(br.readLine());
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.*;
import java.math.*;
import java.util.*;

public class cf1388_Div2_A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int t = in.nextInt();
        for ( ; t > 0; t--) {
        	int sum = in.nextInt();
        	if (sum <= (6 + 10 + 14))
        		System.out.println("NO");
        	else {
        		int val = sum - (6 + 10 + 14);
        		if (val == 6 || val == 10 || val == 14) {
        			if (sum - (6 + 10 + 15) <= 0) System.out.println("NO");
        			else {
        				System.out.println("YES");
        				System.out.println("6 10 15 " + (sum - (6 + 10 + 15)));
        			}
        		}
        		else {
        			System.out.println("YES");
        			System.out.println("6 10 14 " + (sum - (6 + 10 + 14)));
        		}
        	}
        }

        out.close();
    }

    public static void shuffle(int[] arr) {
    	Random rgen = new Random();

    	for (int i = 0; i < arr.length; i++) {
    		int rPos = rgen.nextInt(arr.length);
    		int temp = arr[i];
    		arr[i] = arr[rPos];
    		arr[rPos]=temp;
    	}
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        String next() {
    		while (st == null || !st.hasMoreElements()) {
    			try {
    				st = new StringTokenizer(br.readLine());
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.*;

public class Main{

    public static void main(String[] args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        while(t-->0){
            int n = Integer.parseInt(br.readLine());
            if(n<=30){
                System.out.println("NO");
            }else if(n==36 || n==40 || n==44){
                System.out.println("6 10 15 "+(n-31));
            }else{
                System.out.println("YES");
                System.out.println("14 10 6 "+ (n-30));
            }
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.*;

public class Main{

    public static void main(String[] args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        while(t-->0){
            int n = Integer.parseInt(br.readLine());
            if(n<=30){
                System.out.println("NO");
            }else if(n==36 || n==40 || n==44){
                System.out.println("YES");
                System.out.println("6 10 15 "+(n-31));
            }else{
                System.out.println("YES");
                System.out.println("14 10 6 "+ (n-30));
            }
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.*;

public class Main{

    public static void main(String[] args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        while(t-->0){
            int n = Integer.parseInt(br.readLine());
            if(n<=30){
                System.out.println("NO");
            }else{
                System.out.println("YES");
                System.out.println("14 10 6 "+ (n-30));
            }
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.*;

public class Main{

    public static void main(String[] args)throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        while(t-->0){
            int n = Integer.parseInt(br.readLine());
            if(n<=30 || n==36){
                System.out.println("NO");
            }else if(n==36 || n==40 || n==44){
                System.out.println("6 10 15 "+(n-31));
            }else{
                System.out.println("YES");
                System.out.println("14 10 6 "+ (n-30));
            }
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Codechef
{

	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		int t = scanner.nextInt();
    while(t-->0) {
      int n = scanner.nextInt();
      if(n < 30) System.out.println("NO");
			else {
				System.out.println("YES");
				System.out.println("6 10 14 " + (n-30));
			}
    }
		scanner.close();
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Codechef
{

	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		int t = scanner.nextInt();
    while(t-->0) {
      int n = scanner.nextInt();
			boolean flag = false;
			int c=14;
			if(n>30) {
				flag = true;
				if(n == 36 || n == 40 || n == 44) c = 15;
			}
			if(!flag)
				System.out.println("NO");
			else {
				System.out.println("YES");
				System.out.println("6 10 "+c +" " +(n-6-10-c));
			}
    }
		scanner.close();
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Codechef
{

	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner scanner = new Scanner(System.in);
		int t = scanner.nextInt();
    while(t-->0) {
      int n = scanner.nextInt();
      if(n <= 30) System.out.println("NO");
			else {
				int temp = n-30;
				System.out.println("YES");
				if(temp == 6)
					System.out.println("10 14 15 " + n-10-14-15);
				else if(temp == 10)
					System.out.println("6 14 15 " + n-6-14-15);
				else if(temp == 14)
					System.out.println("6 10 15 " + n-10-6-15);
				else
					System.out.println("6 10 14 " + n-6-10-14);
			}
    }
		scanner.close();
	}
}


import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
       int t=s.nextInt();
       while (t-->=1){
           long n=s.nextInt();
           long num=n-30;
           if (n<31) System.out.println("NO");
           if (n>=31){
               if (num==6||num==10||num==14) {
                   if (num == 6) {
                       long nn = num - 5;
                       System.out.println("YES");
                       System.out.println("14 15 6 " + nn);
                   }
                   if (num == 10) {
                       long nn = num - 5;
                       System.out.println("YES");
                       System.out.println("14 15 6 " + nn);
                   }
                   if (num == 14) {
                       System.out.println("YES");
                       System.out.println("21 15 6 2");
                   }
               }
               else{
                   System.out.println("YES");
                   System.out.println("14 10 6 "+num);
               }
           }
       }
    }

}


import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
       int t=s.nextInt();
       while (t-->=1){
           long n=s.nextInt();
           long num=n-30;
           if (n<31) System.out.println("NO");
           if (n>=31){
               if (num==6){
                   long nn=num-5;
                   System.out.println("YES");
                   System.out.println("14 15 6 "+nn);
               }
               if (num==10){
                   long nn=num-5;
                   System.out.println("YES");
                   System.out.println("14 15 6 "+nn);
               }
               if (num==14){
                   System.out.println("YES");
                   System.out.println("21 15 6 2");
               }
               else{
                   System.out.println("YES");
                   System.out.println("14 10 6 "+num);
               }
           }
       }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
    static FastScanner sc = new FastScanner();
    public static void main(String[] args) {
       int t=sc.nextInt();
       while (t-->=1){
           int n=sc.nextInt();
           if (n<=30){
               System.out.println("NO");
           }

           else{
               int sum=30;
               System.out.println("YES");
               System.out.println("6 10 14 "+(n-sum));
           }
       }

    }

    //    static void sort(int[] a) {
//        ArrayList<Integer> l=new ArrayList<>();
//        for (int i:a) l.add(i);
//        Collections.sort(l);
//        for (int i=0; i<a.length; i++) a[i]=l.get(i);
//    }
    static void sort(long[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (long i : a) l.add((int) i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++) a[i] = l.get(i);
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Solution {

        public static void main(String[] args) {

            Scanner sc=new Scanner(System.in);
            int t=sc.nextInt();

            for(int i=0;i<t;i++){

               int n=sc.nextInt();
               if(n>=30){
                   int f=n-30;
                   System.out.println("YES");
                   System.out.println("6 10 14 "+f);
               }
               else{
                   System.out.println("NO");
               }

            }

    }

}


import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Solution {

        public static void main(String[] args) {

            Scanner sc=new Scanner(System.in);
            int t=sc.nextInt();

            for(int i=0;i<t;i++){

               int n=sc.nextInt();
               if(n>30){
                   int f=n-30;
                   System.out.println("YES");
                   System.out.println("6 10 14 "+f);
               }
               else{
                   System.out.println("NO");
               }

            }

    }

}


import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Solution {

        public static void main(String[] args) {

            Scanner sc=new Scanner(System.in);
            int t=sc.nextInt();

            for(int i=0;i<t;i++){

               int n=sc.nextInt();
               if(n>30){
                   int f=n-30;
                   if(f!=6 && f!=10 && f!=14 ){
                    System.out.println("YES");
                    System.out.println("6 10 14 "+f);
                   }
                   else{
                       System.out.println("NO");
                   }

               }
               else{
                   System.out.println("NO");
               }

            }

    }

}


import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Solution {

        public static void main(String[] args) {

            Scanner sc=new Scanner(System.in);
            int t=sc.nextInt();

            for(int i=0;i<t;i++){

               int n=sc.nextInt();
               if(n==36){
                System.out.println("YES");
                System.out.println("5 10 6 15");
               }
               else if(n==40){
                System.out.println("YES");
                System.out.println("10 14 15 1");
               }
               else if(n==44){
                System.out.println("YES");
                System.out.println("10 14 15 5");
               }
               else if(n>30){
                   int f=n-30;

                    System.out.println("YES");
                    System.out.println("6 10 14 "+f);

               }
               else{
                   System.out.println("NO");
               }

            }

    }

}


import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Solution {

        public static void main(String[] args) {

            Scanner sc=new Scanner(System.in);
            int t=sc.nextInt();

            for(int i=0;i<t;i++){

               int n=sc.nextInt();
               if(n>=30){
                   int f=n-30;
                   if(f!=6 && f!=10 && f!=14 ){
                    System.out.println("YES");
                    System.out.println("6 10 14 "+f);
                   }
                   else{
                       System.out.println("NO");
                   }

               }
               else{
                   System.out.println("NO");
               }

            }

    }

}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        for (int t = 0; t < test; t++) {
            long n = sc.nextLong();

            if (n == 36 || n == 40 || n == 44) {
                System.out.println("YES");
                System.out.println("6 10 15 " + (n - 31));
            } else if (n > 30){
                System.out.println("YES");
                System.out.println("6 10 14 " + (n - 30));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 30 && (n - 30) != 6 && (n - 30) != 10 && (n - 30) != 14){
                System.out.println("YES");
                System.out.println("6 10 14 " + (n - 30));
            } else if (n == 36) {
                System.out.println("YES");
                System.out.println("5 6 10 15");
            } else if (n == 44){
                System.out.println("YES");
                System.out.println("6 7 10 21");
            } else if (n == 40){
                System.out.println("3 6 10 21");
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 19 && (n - 19) != 4 && (n - 19) != 6 && (n - 19) != 9 ){
                System.out.println("YES");
                System.out.println("4 6 9 " + (n - 19));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 19){
                System.out.println("YES");
                System.out.println("4 6 9 " + (n - 4 - 6 - 9));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 12){
                System.out.println("YES");
                System.out.println("4 4 4 " + (n - 4 - 4 - 4));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 19){
                System.out.println("YES");
                System.out.println("4 6 9 " + (n - 19));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        for (int t = 0; t < test; t++) {
            long n = sc.nextLong();
            if (n > 30 && (n - 30) != 6 && (n - 30) != 10 && (n - 30) != 14){
                System.out.println("YES");
                System.out.println("6 10 14 " + (n - 30));
            } else if (n == 36) {
                System.out.println("YES");
                System.out.println("5 6 10 15");
            } else if (n == 44){
                System.out.println("YES");
                System.out.println("6 7 10 21");
            } else if (n == 40){
                System.out.println("3 6 10 21");
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 30 && (n - 30) != 6 && (n - 30) != 10 && (n - 30) != 14){
                System.out.println("YES");
                System.out.println("6 10 14 " + (n - 30));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(
//                new InputStreamReader(System.in));
//        BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
//        log.flush();
        Scanner sc = new Scanner(System.in);

        int test = sc.nextInt();
        int[] simple = new int[] {2, 3, 5, 7, 11, 13, 17, 19};
        for (int t = 0; t < test; t++) {
            int n = sc.nextInt();
            if (n > 30 && (n - 30) != 6 && (n - 30) != 10 && (n - 30) != 14){
                System.out.println("YES");
                System.out.println("6 10 14" + (n - 30));
            } else {
                System.out.println("NO");
            }
        }

    }
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
				 System.out.println("6 10 15 5");
			 }
			 else if(n==40)
			 {
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int leftt=n-30;
				 if(leftt<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+leftt);
				 }
			 }
		}
	}
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
			     System.out.println('YES');
				 System.out.println("6 10 15 5");
			 }
			 else if(n==40)
			 {
			     System.out.println("YES");
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
			     System.out.println("YES");
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int left=n-30;
				 if(left<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+left);
				 }
			 }
		}
	}
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
				 System.out.println("6 10 15 5");
			 }
			 else if(n==40)
			 {
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int leftt=n-30;
				 if(leftt<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+left);
				 }
			 }
		}
	}
}


import java.util.Scanner;

public class CapFlint {
    public static void main(String[] args){
        int t=0,n=0,c=1;
        Scanner scanner=new Scanner(System.in);
        t=scanner.nextInt();
        while (c<=t){
            n=scanner.nextInt();
            if(n<=30){
                System.out.println("NO");
            }
            else if (n>30){
                if(n==36 || n==40 || n==44) {
                    System.out.println("YES");
                    System.out.println("6 10 15 " + (n - 31));
                }
                else if ((n-30)!=6 && (n-30)!=10 && (n-30)!=14){
                    System.out.println("YES");
                    System.out.println("6 10 14 "+(n-30));
                }
                else {
                    System.out.println("NO");
                }
            }
            else {
                System.out.println("NO");
            }
             c=c+1;
        }
    }
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
				 System.out.println("NO");
			 }
			 else if(n==40)
			 {
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int left=n-30;
				 if(left<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+left);
				 }
			 }
		}
	}
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
				 System.out.println("YES");
				 System.out.println("6 10 15 5");
			 }
			 else if(n==40)
			 {
				 System.out.println("YES");
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
				 System.out.println("YES");
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int leftt=n-30;
				 if(leftt<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+(leftt));
				 }
			 }
		}
	}
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			int n=in.nextInt();
			int left=n-(6+10+14);
			if(left<=0)
				System.out.println("NO");
			else
			{
				System.out.println("YES");
				System.out.println("6 10 14 "+left);
			}
		}
	}
}


import java.util.*;
public class codeforces_round_660_div2_A
{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T=in.nextInt();
		while(T-->0)
		{
			 int n=in.nextInt();
			 if(n==36)
			 {
			     System.out.println("YES");
				 System.out.println("6 10 15 5");
			 }
			 else if(n==40)
			 {
			     System.out.println("YES");
				 System.out.println("6 14 15 5");
			 }
			 else if(n==44)
			 {
			     System.out.println("YES");
				 System.out.println("6 10 15 13");
			 }
			 else
			 {
				 int left=n-30;
				 if(left<=0)
				 {
					 System.out.println("NO");
				 }
				 else
				 {
					 System.out.println("YES");
					 System.out.println("6 10 14 "+left);
				 }
			 }
		}
	}
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        loop:
        for (int t1 = 0; t1 < t; t1++) {
            int n = scanner.nextInt();
            if (n < 31) {
                System.out.println("NO");
            } else {
                System.out.println("YES");
                System.out.println(14 + " " + 10 + " " + 6 + " " + (n - 30));
            }
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        loop:
        for (int t1 = 0; t1 < t; t1++) {
            int n = scanner.nextInt();
            if (n < 31) {
                System.out.println("NO");
            } else {
                System.out.println(14 + " " + 10 + " " + 6 + " " + (n - 30));
            }
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        loop:
        for (int t1 = 0; t1 < t; t1++) {
            int n = scanner.nextInt();
            if (n < 31) {
                System.out.println("NO");
            } else {
                if (n - 30 == 14 || n - 30 == 10 || n - 30 == 6) {
                    if (n == 31) {
                        System.out.println("NO");
                    } else {
                        System.out.println("ZES");
                        System.out.println(15 + " " + 10 + " " + 6 + " " + (n - 31));
                    }
                } else {
                    System.out.println(14 + " " + 10 + " " + 6 + " " + (n - 30));
                }
            }
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        loop:
        for (int t1 = 0; t1 < t; t1++) {
            int n = scanner.nextInt();
            if (n < 31) {
                System.out.println("NO");
            } else {
                if (n - 30 == 14 || n - 30 == 10 || n - 30 == 6) {
                    if (n == 31) {
                        System.out.println("NO");
                    } else {
                        System.out.println("YES");
                        System.out.println(15 + " " + 10 + " " + 6 + " " + (n - 31));
                    }
                } else {
                    System.out.println("YES");
                    System.out.println(14 + " " + 10 + " " + 6 + " " + (n - 30));
                }
            }
        }
    }
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

	int mod = 1000000007;

	// even-length array a, consisting of 0s and 1s.
	// remove half elements
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		out = new PrintWriter(new BufferedOutputStream(System.out));

		int T = sc.nextInt();

		// < 30 valid

		// 6 10 14

		// 36 | 6 10 15
		// 40 | 6 10 15
		// 44 | 6 10 15

		for (int t = 0; t < T; t++) {

			int one = 6;
			int two = 10;
			int three = 7;

			int num = sc.nextInt();
			if (num > one + two + three) {
				if (num == 36 || num == 40 || num == 44) {
					three = 15;
				}
				out.println("YES");
				out.println(one + " " + two + " " + three + " " + (num - one + two + three));
			} else {
				out.println("NO");
			}

		}

		out.close();
	}

	// -----------PrintWriter for faster output---------------------------------
	public static PrintWriter out;

	// -----------MyScanner class for faster input----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

	int mod = 1000000007;

	// even-length array a, consisting of 0s and 1s.
	// remove half elements
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		out = new PrintWriter(new BufferedOutputStream(System.out));

		int T = sc.nextInt();

		// < 30 valid

		// 6 10 14

		// 36 | 6 10 15
		// 40 | 6 10 15
		// 44 | 6 10 15

		for (int t = 0; t < T; t++) {

			int one = 6;
			int two = 10;
			int three = 7;

			int num = sc.nextInt();
			if (num > one + two + three) {
				if (num == 36 || num == 40 || num == 44) {
					three = 15;
				}
				out.println("YES");
				out.println(one + " " + two + " " + three + " " + (num - (one + two + three)));
			} else {
				out.println("NO");
			}

		}

		out.close();
	}

	// -----------PrintWriter for faster output---------------------------------
	public static PrintWriter out;

	// -----------MyScanner class for faster input----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

	int mod = 1000000007;

	// even-length array a, consisting of 0s and 1s.
	// remove half elements
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		out = new PrintWriter(new BufferedOutputStream(System.out));

		int T = sc.nextInt();

		int one = 2 * 3;
		int two = 2 * 5;
		int three = 2 * 7;
		int floor = one + two + three;

		for (int t = 0; t < T; t++) {

			int num = sc.nextInt();
			if (num > floor) {
				out.println("YES");
				out.println(one + " " + two + " " + three + " " + (num - floor));
			} else {
				out.println("NO");
			}

		}

		out.close();
	}

	// -----------PrintWriter for faster output---------------------------------
	public static PrintWriter out;

	// -----------MyScanner class for faster input----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

	int mod = 1000000007;

	// even-length array a, consisting of 0s and 1s.
	// remove half elements
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		out = new PrintWriter(new BufferedOutputStream(System.out));

		int T = sc.nextInt();

		// < 30 valid

		// 6 10 14

		// 36 | 6 10 15
		// 40 | 6 10 15
		// 44 | 6 10 15

		for (int t = 0; t < T; t++) {

			int one = 6; // 2 * 3
			int two = 10; // 2 * 5
			int three = 14;

			int num = sc.nextInt();
			if (num > one + two + three) {
				if (num == 36 || num == 40 || num == 44) {
					three = 15;
				}
				out.println("YES");
				out.println(one + " " + two + " " + three + " " + (num - (one + two + three)));
			} else {
				out.println("NO");
			}

		}

		out.close();
	}

	// -----------PrintWriter for faster output---------------------------------
	public static PrintWriter out;

	// -----------MyScanner class for faster input----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------
}


import java.util.HashMap;
import java.util.Scanner;

public class ase {
public static void main(String[] args) {
   Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();

       for(int i=0;i<n;i++)
       {
           int x=sc.nextInt();
           int o=6;
           int p=10;
           int w=14;
           if(x>=30)
           {
               System.out.println("YES");
               System.out.println((x-30)+" "+6+" "+10+ " "+14);
           }
           else{
               System.out.println("NO");
           }
       }

}

}


import java.util.HashMap;
import java.util.Scanner;

public class ase {
public static void main(String[] args) {
   Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();

       for(int i=0;i<n;i++)
       {
           int x=sc.nextInt();
           int o=6;
           int p=10;
           int w=14;

           if(x>=30)
           {
               int op=x-30;
               if(op==6||op==14||op==10)
               {
                   System.out.println("YES");
                   System.out.println((x-31)+" "+6+" "+10+ " "+15);

               }
               else{
                   System.out.println("YES");
                   System.out.println((x-30)+" "+6+" "+10+" "+14);
               }

           }
           else{
               System.out.println("NO");
           }

           }

}

}


import java.util.HashMap;
import java.util.Scanner;

public class ase {
public static void main(String[] args) {
   Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();

       for(int i=0;i<n;i++)
       {
           int x=sc.nextInt();
           int o=6;
           int p=10;
           int w=14;
           if(x>(26))
           {
               System.out.println("YES");
               System.out.println((x-26)+" "+6+" "+10+ " "+14);
           }
           else{
               System.out.println("NO");
           }
       }

}

}


import java.util.HashMap;
import java.util.Scanner;

public class ase {
public static void main(String[] args) {
   Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();

       for(int i=0;i<n;i++)
       {
           int x=sc.nextInt();
           int o=6;
           int p=10;
           int w=14;

           if(x>30)
           {
               int op=x-30;
               if(op==6 || op==14 ||    op==10)
               {
                   System.out.println("YES");
                   System.out.println((x-31)+" "+6+" "+10+ " "+15);
               }
               else
               {
                   System.out.println("YES");
                   System.out.println((x-30)+" "+6+" "+10+" "+14);
               }
           }
           else{
               System.out.println("NO");
           }

           }

}

}


import java.util.HashMap;
import java.util.Scanner;

public class ase {
public static void main(String[] args) {
   Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();

       for(int i=0;i<n;i++)
       {
           int x=sc.nextInt();
           int o=6;
           int p=10;
           int w=14;

           if(x>=30)
           {
               int op=x-30;
               if(op==6||op==14||op==10)
               {
                   System.out.println("YES");
                   System.out.println((x-31)+" "+6+" "+10+ " "+15);

               }
               else{
                   System.out.println("YES");
                   System.out.println((x-31)+" "+6+" "+10+" "+15);
               }

           }
           else{
               System.out.println("NO");
           }

           }

}

}


import java.util.*;
import java.lang.*;
public class MainTest{
    public static void main(String[] arg)
    {
        Scanner sc=new Scanner(System.in);
        int a=6,b=14,c=10;
        int t=sc.nextInt();
        while(t!=0)
        {
            int n=sc.nextInt();

            if(n==36 || n== 40 || n== 44)
            {
                b=15;
            }
            int x=n-(a+b+c);
            if(n<31)
            {
                System.out.println("NO");
            }
            else
            {
                System.out.println("YES");
                System.out.println(a+" "+b+" "+c+" "+x);
            }
            --t;
        }
    }
}


import java.util.*;
import java.lang.*;
public class MainTest{
    public static void main(String[] arg)
    {
        Scanner sc=new Scanner(System.in);

        int t=sc.nextInt();
        while(t!=0)
        {
            int a=6,b=14,c=10;
            int n=sc.nextInt();

            if(n==36 || n== 40 || n== 44)
            {
                b=15;
            }
            int x=n-(a+b+c);
            if(n<31)
            {
                System.out.println("NO");
            }
            else
            {
                System.out.println("YES");
                System.out.println(a+" "+b+" "+c+" "+x);
            }
            --t;
        }
    }
}


import java.util.*;
import java.lang.*;
public class MainTest{
    public static void main(String[] arg)
    {
        Scanner sc=new Scanner(System.in);
        int a=6,b=14,c=10;
        int t=sc.nextInt();
        while(t!=0)
        {
            int n=sc.nextInt();
            int x=n-30;
            Boolean result=false;
            if(x>0 && x!=a && x!=b && x!=c)
            {
                result=true;//No
            }
            if(!result)
            {
                System.out.println("NO");
            }
            else
            {
                System.out.println("YES");
                System.out.println(a+" "+b+" "+c+" "+x);
            }
            --t;
        }
    }
}


import java.util.*;
import java.lang.*;
public class MainTest{
    public static void main(String[] arg)
    {
        Scanner sc=new Scanner(System.in);
        int a=6,b=14,c=10;
        int t=sc.nextInt();
        while(t!=0)
        {
            int n=sc.nextInt();
            int x=n-30;
            Boolean result=false;
            if(x==a || x==b||x==c)
            {
                result=true;//No
            }
            if(result)
            {
                System.out.println("NO");
            }
            else
            {
                System.out.println("YES");
                System.out.println(a+" "+b+" "+c+" "+x);
            }
            --t;
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class a
{
    public static void print(String str,long val){
        System.out.println(str+"  "+val);
    }

    public long gcd(long a, long b) {
        if (b==0L) return a;
        return gcd(b,a%b);
    }

    public static void debug(long[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(int[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(arr[i]);
        }
    }

    public static void print(int[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    public static void print(Object[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(long[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }
        public FastReader(String path) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(path));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        int t = s.nextInt();
        for(int tt=0;tt<t;tt++){
            int n = s.nextInt();
            if(n<=(3*6)){
                System.out.println("NO");
            }
            else {
                System.out.println("YES");
                System.out.println(6+" "+6+" "+6+" "+(n-18));
            }
        }

    }

//    OutputStream out = new BufferedOutputStream( System.out );
//        for(int i=1;i<n;i++){
//              out.write((arr[i]+" ").getBytes());
//         }
//        out.flush();
//  long start_time = System.currentTimeMillis();
//  long end_time = System.currentTimeMillis();
//  System.out.println((end_time - start_time) + "ms");

}


import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class a
{
    public static void print(String str,long val){
        System.out.println(str+"  "+val);
    }

    public long gcd(long a, long b) {
        if (b==0L) return a;
        return gcd(b,a%b);
    }

    public static void debug(long[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(int[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(arr[i]);
        }
    }

    public static void print(int[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    public static void print(Object[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(long[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }
        public FastReader(String path) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(path));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        int t = s.nextInt();
        for(int tt=0;tt<t;tt++){
            int n = s.nextInt();
            if(n<=(6+10+14)){
                System.out.println("NO");
            }
            else {
                int temp = n-6-10-14;
                if(temp!=6 && temp!=10 && temp!=14){
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+14+" "+temp);
                }
                else if(temp==6){
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+15+" "+5);
                }
                else if(temp==10){
                    System.out.println("YES");
                    System.out.println(6+" "+15+" "+14+" "+5);
                }
                else {
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+15+" "+13);
                }
            }
        }

    }

//    OutputStream out = new BufferedOutputStream( System.out );
//        for(int i=1;i<n;i++){
//              out.write((arr[i]+" ").getBytes());
//         }
//        out.flush();
//  long start_time = System.currentTimeMillis();
//  long end_time = System.currentTimeMillis();
//  System.out.println((end_time - start_time) + "ms");

}


import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class a
{
    public static void print(String str,long val){
        System.out.println(str+"  "+val);
    }

    public long gcd(long a, long b) {
        if (b==0L) return a;
        return gcd(b,a%b);
    }

    public static void debug(long[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(int[][] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static void debug(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.println(arr[i]);
        }
    }

    public static void print(int[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    public static void print(Object[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(String[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }
    public static void print(long[] arr){
        int len = arr.length;
        for(int i=0;i<len;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.print('\n');
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }
        public FastReader(String path) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(path));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader s=new FastReader();
        int t = s.nextInt();
        for(int tt=0;tt<t;tt++){
            int n = s.nextInt();
            if(n<=(6+10+14)){
                System.out.println("NO");
            }
            else {
                int temp = n-6-10-14;
                if(temp!=6 || temp!=10 || temp!=14){
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+14+" "+temp);
                }
                else if(temp==6){
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+15+" "+5);
                }
                else if(temp==10){
                    System.out.println("YES");
                    System.out.println(6+" "+15+" "+14+" "+5);
                }
                else {
                    System.out.println("YES");
                    System.out.println(6+" "+10+" "+15+" "+13);
                }
            }
        }

    }

//    OutputStream out = new BufferedOutputStream( System.out );
//        for(int i=1;i<n;i++){
//              out.write((arr[i]+" ").getBytes());
//         }
//        out.flush();
//  long start_time = System.currentTimeMillis();
//  long end_time = System.currentTimeMillis();
//  System.out.println((end_time - start_time) + "ms");

}


import java.util.*;
public class a1388 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int tests = in.nextInt();
        for (int i = 0 ; i < tests; i++){
            int n = in.nextInt();
            int[] result = eval(n);
            if (result == null) System.out.println("NO");
            else{
                System.out.println("YES");
                for (int j : result) System.out.print(result + " ");
            }
        }
        in.close();
    }
    private static int[] eval(int n){
        if ( n >= 24) return null;
        else return new int[]{ 6, 8, 10, n-24};
    }
}


import java.util.*;
public class a1388 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int tests = in.nextInt();
        for (int i = 0 ; i < tests; i++){
            int n = in.nextInt();
            int[] result = eval(n);
            if (result == null) System.out.print("NO");
            else{
                System.out.println("YES");
                for (int j : result) System.out.print(j + " ");
            }
            System.out.println();
        }
        in.close();
    }
    private static int[] eval(int n){
        int diff = n - 30;
        if (diff <= 0) return null;
        if (diff == 6 || diff == 10 || diff == 14){
            return new int[]{6, 10, 15, n - 31};
        } else return new int[]{6, 10, 14, diff};
    }
}


import java.util.*;
public class a1388 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int tests = in.nextInt();
        for (int i = 0 ; i < tests; i++){
            int n = in.nextInt();
            int[] result = eval(n);
            if (result == null) System.out.print("NO");
            else{
                System.out.println("YES");
                for (int j : result) System.out.print(j + " ");
            }
            System.out.println();
        }
        in.close();
    }
    private static int[] eval(int n){
        if ( n <= 30) return null;
        else return new int[]{ 6, 10, 14, n-30};
    }
}


import java.util.*;
public class a1388 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int tests = in.nextInt();
        for (int i = 0 ; i < tests; i++){
            int n = in.nextInt();
            int[] result = eval(n);
            if (result == null) System.out.println("NO");
            else{
                System.out.println("YES");
                for (int j : result) System.out.print(j + " ");
            }
        }
        in.close();
    }
    private static int[] eval(int n){
        if ( n <= 24) return null;
        else return new int[]{ 6, 8, 10, n-24};
    }
}


import java.util.*;
public class a1388 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int tests = in.nextInt();
        for (int i = 0 ; i < tests; i++){
            int n = in.nextInt();
            int[] result = eval(n);
            if (result == null) System.out.print("NO");
            else{
                System.out.println("YES");
                for (int j : result) System.out.print(j + " ");
            }
            System.out.println();
        }
        in.close();
    }
    private static int[] eval(int n){
        if ( n <= 28) return null;
        else return new int[]{ 6, 8, 14, n-28};
    }
}


import java.util.Scanner;

public class CaptainFlintAndCrewRecruitment_1388A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        for(int i=0; i<t; i++){
            int n = s.nextInt();
            if(n<=30){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
                int x = n-30;
                if(x== 6 || x== 10 || x==14){
                    System.out.println(6+" "+10+" "+15+" "+(n-31));
                }
                else{
                    System.out.println(6+" "+10+" "+14+" "+(n-30));
                }
            }
        }
    }
}


import java.util.Scanner;

public class CaptainFlintAndCrewRecruitment_1388A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        for(int i=0; i<t; i++){
            int n = s.nextInt();
            if(n<=30){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
                System.out.println(6+" "+10+" "+14+" "+(n-30));
            }
        }
    }
}


import java.util.Scanner;

public class CaptainFlintAndCrewRecruitment_1388A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        for(int i=0; i<t; i++){
            int n = s.nextInt();
            if(n<=30){
                System.out.println("NO");
            }
            else{
                System.out.println("YES");
                int x = n-30;
                if(x== 6 || x== 10 || x==7){
                    System.out.println(6+" "+10+" "+15+" "+(n-31));
                }
                else{
                    System.out.println(6+" "+10+" "+14+" "+(n-30));
                }
            }
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            int T = sc.nextInt();
            while (T-- > 0) {
                int N = sc.nextInt();
                if (N <30) {
                    System.out.println("NO");
                } else {
                    System.out.println("YES");
                    if(N==36){
                        System.out.println(6+" "+10+" "+15+" "+5);
                        continue;

                    }
                    if(N==40){
                        System.out.println(6+" "+10+" "+15+" "+9);
                         continue;
                    }
                    if(N==44){
                        System.out.println(6+" "+10+" "+15+" "+13);
                          continue;
                    }
                    else{
                        System.out.println(6+" "+10+" "+14+" "+(N-30));
                    }
                }
            }
        }
        catch (Exception e){
            return;
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            int T = sc.nextInt();
            while (T-- > 0) {
                int N = sc.nextInt();
                if (N < 31) {
                    System.out.println("NO");
                } else {
                    System.out.println("YES");
                    System.out.println(6 + " " + 10 + " " + 14 + " " + (N - 30));
                }
            }
        }
        catch (Exception e){
            return;
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            int T = sc.nextInt();
            while (T-- > 0) {
                int N = sc.nextInt();
                if (N <30) {
                    System.out.println("NO");
                } else {
                    System.out.println("YES");
                    if(N==36){
                        System.out.println(6+" "+10+" "+15+" "+5);
                    }
                    if(N==40){
                        System.out.println(6+" "+10+" "+15+" "+9);
                    }
                    if(N==44){
                        System.out.println(6+" "+10+" "+15+" "+13);
                    }
                    else{
                        System.out.println(6+" "+10+" "+14+" "+(N-30));
                    }
                }
            }
        }
        catch (Exception e){
            return;
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            int T = sc.nextInt();
            while (T-- > 0) {
                int N = sc.nextInt();
                if (N <31) {
                    System.out.println("NO");
                } else {
                    System.out.println("YES");
                    if(N==36){
                        System.out.println(6+" "+10+" "+15+" "+5);
                        continue;
                    }
                    if(N==40){
                        System.out.println(6+" "+10+" "+15+" "+9);
                        continue;
                    }
                    if(N==44){
                        System.out.println(6+" "+10+" "+15+" "+13);
                        continue;
                    }
                    else{
                        System.out.println(6+" "+10+" "+14+" "+(N-30));
                        continue;
                    }
                }
            }
        }
        catch (Exception e){
            return;
        }
    }
}


import java.util.Scanner;

public class NearlyPrime
{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while((t--)>0){
			int n=sc.nextInt();
			int res=30;
			if(res>n){
				System.out.println("NO");
			}
			else{
				int x=6,y=10,z=14;
				int sum=x+y+z;
				int diff=Math.abs(sum-n);
				while(true){
				if(diff==x || diff==y || diff==z){
					z=15;
					sum=x+y+z;
					diff=Math.abs(sum-n);
					if(diff!=x && diff!=y && diff!=z && diff+sum==n){
						System.out.println("YES");
						System.out.println(x+" "+y+" "+z+" "+diff);
						break;
					}
				}
				else{
					System.out.println("YES");
					System.out.println(x+" "+y+" "+z+" "+diff);
					break;
				}
				}

			}
		}
	}
}


import java.util.Scanner;

public class NearlyPrime
{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while((t--)>0){
			int n=sc.nextInt();
			int res=30;
			if(res>n){
				System.out.println("NO");
			}
			else{
				int x=6,y=10,z=14;
				int sum=x+y+z;
				int diff=Math.abs(sum-n);
				while(true){
					int a=3,b=5;
				if(diff==x || diff==y || diff==z){
					z=a*b;
					sum=x+y+z;
					diff=Math.abs(sum-n);
					if(diff!=x && diff!=y && diff!=z && diff+sum==n){
						System.out.println("YES");
						System.out.println(x+" "+y+" "+z+" "+diff);
						break;
					}
					else{
						b+=2;
					}
				}
				else{
					System.out.println("YES");
					System.out.println(x+" "+y+" "+z+" "+diff);
					break;
				}
				}

			}
		}
	}
}


import java.util.Scanner;

public class NearlyPrime
{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while((t--)>0){
			int n=sc.nextInt();
			int res=30;
			if(res>n){
				System.out.println("NO");
			}
			else{
				int x=6,y=10,z=14;
				int sum=x+y+z;
				int diff=Math.abs(sum-n);
				while(true){
					int a=3,b=5,c=2,d=9;
				if(diff==x || diff==y || diff==z){
					z=a*b;
					sum=x+y+z;
					diff=Math.abs(sum-n);
					if(diff!=x && diff!=y && diff!=z && diff+sum==n){
						System.out.println("YES");
						System.out.println(x+" "+y+" "+z+" "+diff);
						break;
					}
					else{
						b+=2;
						x=c*d;
					}
				}
				else{
					System.out.println("YES");
					System.out.println(x+" "+y+" "+z+" "+diff);
					break;
				}
				}

			}
		}
	}
}


import java.util.Scanner;

public class NearlyPrime
{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while((t--)>0){
			int n=sc.nextInt();
			int res=30;
			if(res>=n){
				System.out.println("NO");
			}
			else{
				int x=6,y=10,z=14;
				int sum=x+y+z;
				int diff=Math.abs(sum-n);
				while(true){
					int a=3,b=5,c=2,d=9;
				if(diff==x || diff==y || diff==z){
					z=a*b;
					sum=x+y+z;
					diff=Math.abs(sum-n);
					if(diff!=x && diff!=y && diff!=z && diff+sum==n){
						System.out.println("YES");
						System.out.println(x+" "+y+" "+z+" "+diff);
						break;
					}
					else{
						b+=2;
						x=c*d;
					}
				}
				else{
					System.out.println("YES");
					System.out.println(x+" "+y+" "+z+" "+diff);
					break;
				}
				}

			}
		}
	}
}


import java.util.Scanner;

public class NearlyPrime
{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while((t--)>0){
			int n=sc.nextInt();
			int res=30;
			if(res>n){
				System.out.println("NO");
			}
			else{
				System.out.println("YES");
				int diff=n-res;
				int x=6,y=10,z=14,sum=0;
				if(diff==6){
					x=15;
					sum=15+14+10;
					if(sum<=n)
						diff=n-sum;
				}
				if(diff==10){
					y=15;
					sum=15+14+6;
					diff=n-sum;
				}
				if(diff==14){
					z=15;
					sum=15+6+10;
					if(sum<=n)
						diff=n-sum;
				}
				System.out.println(x+" "+y+" "+z+" "+diff);
			}
		}
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int t=sc.nextInt();
	    while(t-->0){
	        int n=sc.nextInt();
	        if(n<31)System.out.println("NO");
	        else{
	            System.out.println("YES");
	            int a=0;
	            if(n==36 || n==40 || n==44){
	                a=n-31;
	                System.out.println("6 10 15 "+a);
	            }
	            else{
	                a=n-30;
	                System.out.println("6 10 14 "+a);
	            }
	        }
	    }
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int t=sc.nextInt();
	    while(t-->0){
	        int n=sc.nextInt();
	        if(n<31)System.out.println("NO");
	        else{
	            System.out.println("YES");
	            System.out.println("6 10 14 "+(n-30));
	        }
	    }
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int t=sc.nextInt();
	    while(t-->0){
	        int n=sc.nextInt();
	        if(n<31)System.out.println("NO");
	        else{
	            System.out.println("YES");
	            int a=0;
	            if(n==36){
	                a=5;
	                System.out.println("6 10 15 "+a);
	            }
	            else if(n==40){
	                a=9;
	                System.out.println("6 10 15 "+a);
	            }
	            else if(n==45){
	                a=24;
	                System.out.println("6 10 15 "+a);
	            }
	            else{
	                a=n-30;
	                System.out.println("6 10 14 "+a);
	            }
	        }
	    }
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int t=sc.nextInt();
	    while(t-->0){
	        int n=sc.nextInt();
	        if(n<31)System.out.println("NO");
	        else{
	            System.out.println("YES");
	            int a=0;
	            if(n==36){
	                a=5;
	                System.out.println("6 10 15 "+a);
	            }
	            else if(n==40){
	                a=9;
	                System.out.println("6 10 15 "+a);
	            }
	            else if(n==44){
	                a=24;
	                System.out.println("6 10 15 "+a);
	            }
	            else{
	                a=n-30;
	                System.out.println("6 10 14 "+a);
	            }
	        }
	    }
	}
}


import java.util.*;
import java.io.*;
public class main
{
    public static void main (String[] args)
    {
    	Scanner my = new Scanner(System.in);
    	int t = my.nextInt();
    	while(t>0) {
    		int n = my.nextInt();
        	if(n<30) {
        		System.out.println("NO");
        	}
        	else {
        		System.out.println("YES");
        		int m = n-30;
        		System.out.println("6 10 14 " + m);

        	}
        	t--;
    	}

    }

}


import java.util.*;
import java.io.*;
public class Main
{
    public static void main (String[] args)
    {
    	Scanner my = new Scanner(System.in);
    	int t = my.nextInt();
    	while(t>0) {
    		int n = my.nextInt();
        	if(n<30) {
        		System.out.println("NO");
        	}
        	else {
        		System.out.println("YES");
        		if(n==36||n==44||n==40)
        		{
        			int m = n-31;
        			System.out.println("6 10 15 " + m);
        		}
        		else {
        			int m = n-30;
        			System.out.println("6 10 14 " + m);
        		}
        	}
        	t--;
    	}

    }

}


import java.util.*;
import java.io.*;
public class main
{
    public static void main (String[] args)
    {
    	Scanner my = new Scanner(System.in);
    	int t = my.nextInt();
    	while(t>0) {
    		int n = my.nextInt();
        	if(n<30) {
        		System.out.println("NO");
        	}
        	else {
        		System.out.println("YES");
        		if(n==36||n==44||n==40)
        		{
        			int m = n-31;
        			System.out.println("6 10 15 " + m);
        		}
        		else {
        			int m = n-30;
        			System.out.println("6 10 14 " + m);
        		}
        	}
        	t--;
    	}

    }

}


import java.util.*;
import java.io.*;
public class main
{
    public static void main (String[] args)
    {
    	Scanner my = new Scanner(System.in);
    	int t = my.nextInt();
    	while(t>0) {
    		int n = my.nextInt();
        	if(n<=30) {
        		System.out.println("NO");
        	}
        	else {
        		System.out.println("YES");
        		if(n==36||n==44||n==40)
        		{
        			int m = n-31;
        			System.out.println(6 + " " + 10 + " " + 15 + " " + m);
        		}
        		else {
        			int m = n-30;
        			System.out.println(6 + " " + 10 + " " + 14 + " " + m);
        		}
        	}
        	t--;
    	}

    }

}


import java.util.*;
import java.io.*;
public class main
{
    public static void main (String[] args)
    {
    	Scanner my = new Scanner(System.in);
    	int t = my.nextInt();
    	while(t>0) {
    		int n = my.nextInt();
        	if(n<30) {
        		System.out.println("NO");
        	}
        	else {
        		System.out.println("YES");
        		if(n==36||n==44||n==40) {
        			System.out.println("6 10 15" + n-31);
        		}
        		else
        		System.out.println("6 10 14 " + n-30);

        	}
        	t--;
    	}

    }
}