Despite his bad reputation, Captain Flint is a friendly person (at least, friendly to animals). Now Captain Flint is searching worthy sailors to join his new crew (solely for peaceful purposes). A sailor is considered as worthy if he can solve Flint's task.

Recently, out of blue Captain Flint has been interested in math and even defined a new class of integers. Let's define a positive integer $x$ as nearly prime if it can be represented as $p \cdot q$, where $1 < p < q$ and $p$ and $q$ are prime numbers. For example, integers $6$ and $10$ are nearly primes (since $2 \cdot 3 = 6$ and $2 \cdot 5 = 10$), but integers $1$, $3$, $4$, $16$, $17$ or $44$ are not.

Captain Flint guessed an integer $n$ and asked you: can you represent it as the sum of $4$ different positive integers where at least $3$ of them should be nearly prime.

Uncle Bogdan easily solved the task and joined the crew. Can you do the same?


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 1000$) — the number of test cases.

Next $t$ lines contain test cases — one per line. The first and only line of each test case contains the single integer $n$ $(1 \le n \le 2 \cdot 10^5)$ — the number Flint guessed.


-----Output-----

For each test case print:   YES and $4$ different positive integers such that at least $3$ of them are nearly prime and their sum is equal to $n$ (if there are multiple answers print any of them);  NO if there is no way to represent $n$ as the sum of $4$ different positive integers where at least $3$ of them are nearly prime.  You can print each character of YES or NO in any case.


-----Example-----
Input
7
7
23
31
36
44
100
258

Output
NO
NO
YES
14 10 6 1
YES
5 6 10 15
YES
6 7 10 21
YES
2 10 33 55
YES
10 21 221 6


-----Note-----

In the first and second test cases, it can be proven that there are no four different positive integers such that at least three of them are nearly prime.

In the third test case, $n=31=2 \cdot 7 + 2 \cdot 5 + 2 \cdot 3 + 1$: integers $14$, $10$, $6$ are nearly prime.

In the fourth test case, $n=36=5 + 2 \cdot 3 + 2 \cdot 5 + 3 \cdot 5$: integers $6$, $10$, $15$ are nearly prime.

In the fifth test case, $n=44=2 \cdot 3 + 7 + 2 \cdot 5 + 3 \cdot 7$: integers $6$, $10$, $21$ are nearly prime.

In the sixth test case, $n=100=2 + 2 \cdot 5 + 3 \cdot 11 + 5 \cdot 11$: integers $10$, $33$, $55$ are nearly prime.

In the seventh test case, $n=258=2 \cdot 5 + 3 \cdot 7 + 13 \cdot 17 + 2 \cdot 3$: integers $10$, $21$, $221$, $6$ are nearly prime.

Source: codeforces | Difficulty: EASY
Tags: Number theory

Complete search

Mathematics

Greedy algorithms


Solutions:
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('No')
	elif n - 30 == 10:
		print('Yes')
		print('6 5 14', n - 30 + 5)
	elif n - 30 == 14:
		print('Yes')
		print('6 10 7', n - 30 + 7)
	elif n - 30 == 6:
		print('Yes')
		print('5 6 10 15')
	else:
		print('Yes')
		print('6 10 14', n - 30)


nearly_prime = [6, 10, 14, 15, 21, 35]
for t in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		print(6, 10, end=' ')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(15, n - 31)
		else:
			print(14, n - 30)


import os
import sys
from io import BytesIO, IOBase
import threading
from math import gcd, log

def main():
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	main()


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		temp = n - 30
		if temp == 6 or temp == 10 or temp == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
ints = [6, 10, 14, 15, 18, 21, 27, 33]
n = 8
for _ in range(r()):
	num = r()
	a = -1
	res = False
	for i in range(n - 2):
		for j in range(i + 1, n - 1):
			for k in range(j + 1, n):
				if num - ints[i] - ints[j] - ints[k] <= 0:
					continue
				temp = num - ints[i] - ints[j] - ints[k]
				if temp != ints[i] and temp != ints[j] and (temp != ints[k]):
					a = [ints[i], ints[j], ints[k], temp]
					res = True
					break
			if res:
				break
		if res:
			break
	if a == -1:
		print('NO')
	else:
		print('Yes')
		print(a[0], a[1], a[2], a[3])


t = int(input())
while t:
	n = int(input())
	if n < 31:
		print('NO')
	else:
		l = [6, 10, 14]
		d = n - 30
		if d in l:
			d -= 1
			l[2] = 15
		print('YES')
		for i in l:
			print(i, end=' ')
		print(d)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		l = [6, 10, 14]
		if n - 30 in l:
			print('YES')
			print('6' + ' ' + '10' + ' ' + '15' + ' ' + str(n - 31))
		else:
			print('YES')
			print('6' + ' ' + '10' + ' ' + '14' + ' ' + str(n - 30))


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


n = int(input())
for i in range(n):
	a = int(input())
	if a <= 30:
		print('NO')
	elif a > 30 and a - 30 != 6 and (a - 30 != 10) and (a - 30 != 14):
		print('YES')
		print(6, 10, 14, a - 30)
	else:
		print('YES')
		print(6, 10, 15, a - 31)


test_case = int(input())
for _ in range(test_case):
	n = int(input())
	result = [6, 10, 14]
	if n < 31:
		print('NO')
	else:
		if n - 30 in result:
			result[2] = 15
		print('YES')
		print(*[*result, n - sum(result)])


test = int(input())
for i in range(test):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6:
			print(5, 6, 10, 15)
		elif n - 30 == 10:
			print(3, 6, 21, 10)
		elif n - 30 == 14:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class union_find:

	def __init__(self, n):
		self.n = n
		self.rank = [0] * n
		self.parent = [int(j) for j in range(n)]

	def union(self, i, j):
		i = self.find(i)
		j = self.find(j)
		if self.rank[i] == self.rank[j]:
			self.parent[i] = j
			self.rank[j] += 1
		elif self.rank[i] > self.rank[j]:
			self.parent[j] = i
		else:
			self.parent[i] = j

	def find(self, i):
		temp = i
		if self.parent[temp] != temp:
			self.parent[temp] = self.find(self.parent[temp])
		return self.parent[temp]
from math import log2, ceil

def main():
	for t in range(int(input())):
		n = int(input())
		if n > 30:
			print('YES')
			if n == 40:
				print(10, 14, 15, 1)
			elif n == 36:
				print(10, 6, 15, 5)
			elif n == 44:
				print(10, 14, 15, 5)
			else:
				print(10, 14, 6, n - 30)
		else:
			print('NO')
main()


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	n = int(input())
	if n > 30 and n - 30 not in [6, 10, 14]:
		print('YES')
		print(*[6, 10, 14, n - 30])
	elif n > 31 and n - 31 not in [6, 10, 15]:
		print('YES')
		print(*[6, 10, 15, n - 31])
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n > 30 and n != 36 and (n != 40) and (n != 44):
		print('YES')
		print(6, 10, 14, n - 30)
	elif n <= 30:
		print('NO')
	elif n == 40 or n == 36 or n == 44:
		print('YES')
		print(6, 15, 14, n - 35)


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 9 10 15')
	elif n == 44:
		print('YES')
		print('6 10 13 15')
	else:
		print('YES')
		print('6 10 14 ' + str(n - (6 + 10 + 14)))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	if n > 44:
		print('YES')
		print(6, 10, 14, n - 30)
		continue
	l = [36, 44, 40]
	if n in l:
		print('YES')
		print(6, 10, 15, n - 31)
		continue
	print('YES')
	print(6, 10, 14, n - 30)


t = int(input())
nums = []
for i in range(t):
	nums.append(int(input()))
for num in nums:
	if num >= 31:
		print('YES')
		if num == 36:
			print('{} {} {} {}'.format(6, 10, 15, 5))
		elif num == 40:
			print('{} {} {} {}'.format(6, 10, 15, 9))
		elif num == 44:
			print('{} {} {} {}'.format(6, 10, 15, 13))
		else:
			print('{} {} {} {}'.format(6, 10, 14, num - 30))
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		k = n - 30
		if k == 6:
			print(6, 10, 15, 5)
		elif k == 10:
			print(6, 10, 15, 9)
		elif k == 14:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, k)


T = int(input())
for _ in range(T):
	n = int(input())
	ans = [6, 10, 14]
	if n < 31:
		print('NO')
	else:
		if n - 30 in ans:
			ans = [6, 10, 15]
			ans.append(n - 31)
		else:
			ans.append(n - 30)
		print('YES')
		print(*ans)


import sys

def solve(n):
	num = 2 * 3 + 2 * 5 + 2 * 7 + 1
	if num == n:
		return (14, 10, 6, 1)
	return (6, 10, 14, n - 30)
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	if n < 2 * 3 + 2 * 5 + 2 * 7 + 1:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 44:
			print(6, 7, 10, 21)
		elif n == 40:
			print(6, 10, 15, 9)
		else:
			ans = solve(n)
			print(ans[0], ans[1], ans[2], ans[3])


t = int(input())
for _ in range(t):
	n = int(input())
	thres = 10 + 6 + 14
	if n > thres:
		if n - thres == 10 or n - thres == 6 or n - thres == 14:
			print('YES')
			print(f'6 10 15 {n - 31}')
		else:
			print('YES')
			print(f'10 6 14 {n - thres}')
	else:
		print('NO')


def answer(n):
	flag = 0
	if n <= 30:
		return (flag, 'NO')
	else:
		flag = 1
		if n == 36:
			return (flag, [5, 6, 10, 15])
		elif n == 40:
			return (flag, [10, 15, 14, 1])
		elif n == 44:
			return (flag, [10, 15, 14, 5])
		else:
			return (flag, [6, 10, 14, n - 30])
t = int(input())
for i in range(t):
	n = int(input())
	(x, y) = answer(n)
	if x == 0:
		print('NO')
	else:
		print('YES')
		print(*y)


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		cl = [6, 10, 14]
		if n - 30 not in cl:
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


def main():
	primes = [2, 3, 5, 7, 11, 13, 17, 19]
	nearly = []
	for (i, p) in enumerate(primes):
		for q in primes[i + 1:]:
			nearly.append(p * q)
	nearly = sorted(set(nearly))
	for _ in range(int(input())):
		n = int(input())
		ans = None
		for i in range(len(nearly)):
			for j in range(i + 1, len(nearly)):
				for k in range(j + 1, len(nearly)):
					ni = nearly[i]
					nj = nearly[j]
					nk = nearly[k]
					nl = n - ni - nj - nk
					if nl > 0 and nl not in [ni, nj, nk]:
						ans = [ni, nj, nk, nl]
						break
				if ans is not None:
					break
			if ans is not None:
				break
		if ans is not None:
			print('YES')
			print(' '.join(map(str, ans)))
		else:
			print('NO')
main()


t = int(input())
while t:
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		q = n - 30
		print('YES')
		if q == 6 or q == 10 or q == 14:
			print(6, 10, 15, q - 1, end=' ')
		else:
			print(6, 10, 14, q, end=' ')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15, sep=' ')
	elif n == 40:
		print('YES')
		print(9, 6, 10, 15, sep=' ')
	elif n == 44:
		print('YES')
		print(7, 6, 10, 21, sep=' ')
	else:
		print('YES')
		print(6, 10, 14, n - 30, sep=' ')


for _ in range(int(input())):
	n = int(input())
	k = n - 2 * (3 + 5 + 7)
	if k <= 0:
		print('NO')
	elif k == 6 or k == 10 or k == 14:
		print('YES')
		print(2 * 3, 2 * 5, 3 * 5, k - 1)
	else:
		print('YES')
		print(2 * 3, 2 * 5, 2 * 7, n - 2 * (3 + 5 + 7))


for i in range(int(input())):
	a = int(input())
	if a > 30:
		if a - 30 == 6 or a - 30 == 10 or a - 30 == 14:
			if a > 31:
				print('YES')
				print(10, 6, 15, a - 31)
			else:
				print('NO')
		else:
			print('YES')
			print(6, 10, 14, a - 30)
	else:
		print('NO')


try:
	t = int(input())
	while t != 0:
		n = int(input())
		if n > 30:
			print('YES')
			if n == 36:
				print(6, 10, 15, n - 6 - 10 - 15, sep=' ')
			elif n == 44:
				print(6, 10, 15, n - 6 - 10 - 15, sep=' ')
			elif n == 40:
				print(6, 10, 15, n - 6 - 10 - 15, sep=' ')
			else:
				print(6, 10, 14, n - 6 - 10 - 14, sep=' ')
		else:
			print('NO')
		t = t - 1
except EOFError:
	print(' ')


for _ in range(int(input())):
	n = int(input())
	if n > 30:
		x = n - 30
		print('YES')
		if x == 6 or x == 10 or x == 14:
			print(6, 10, 15, x - 1)
		else:
			print(6, 10, 14, x)
	else:
		print('NO')


for _ in ' ' * int(input()):
	a = int(input())
	if a > 30:
		print('YES')
		if a == 40:
			print(1, 14, 10, 15)
		elif a == 36:
			print(5, 6, 10, 15)
		elif a == 44:
			print(15, 10, 6, 13)
		else:
			print(6, 10, 14, a - 30)
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	if n >= 31:
		print('YES')
		d = n - 30
		if d == 6 or d == 10 or d == 14:
			print(6, 10, 15, d - 1)
		else:
			print(6, 10, 14, d)
	else:
		print('NO')


for g in [*open(0)][1:]:
	g = int(g)
	if g > 30 and g - 30 not in [6, 10, 14]:
		print('YES')
		print(6, 10, 14, g - 30)
	elif g > 31 and g - 31 not in [6, 10, 15]:
		print('YES')
		print(6, 10, 15, g - 31)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	p = n - (6 + 10 + 14)
	if p > 0 and p != 6 and (p != 10) and (p != 14):
		print('YES')
		print(6, 10, 14, p)
	elif p < 0:
		print('NO')
	elif p - 1 > 0:
		print('YES')
		print(p - 1, 10, 15, 6)
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for t1 in range(t):
	n = int(input())
	fact = []
	if n > 6 + 10 + 14:
		a = 6
		b = 10
		c = 14
		if n - 30 == a:
			c = 15
		if n - 30 == b:
			c = 15
		if n - 30 == c:
			c = 15
		if a + b + c < n:
			print('YES')
			print(a, b, c, n - a - b - c)
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 40:
			l = [10, 14, 15, 1]
		elif n == 44:
			l = [10, 14, 15, 5]
		elif n == 36:
			l = [10, 15, 6, 5]
		else:
			l = [6, 10, 14, n - 30]
		print(*l)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		print('YES')
		d = n - 30
		if d not in l:
			print(6, 10, 14, d)
		else:
			print(6, 10, 15, d - 1)


t = int(input())
for _ in range(t):
	n = int(input())
	a = 6
	n -= 6
	b = 10
	n -= 10
	c = 14
	n -= 14
	d = n
	if d == 6:
		a = 5
		b = 6
		c = 15
		d = 10
		print('YES')
		print(a, b, c, d)
		continue
	if d == 10:
		b = 15
		d = 5
		print('YES')
		print(a, b, c, d)
		continue
	if d == 14:
		c = 21
		d = 7
		print('YES')
		print(a, b, c, d)
		continue
	elif a > 0 and b > 0 and (c > 0) and (d > 0):
		print('YES')
		print(a, b, c, d)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n > 30:
		if n == 36:
			print('YES')
			print(5, 6, 10, 15)
		elif n == 40:
			print('YES')
			print(6, 10, 21, 3)
		elif n == 44:
			print('YES')
			print(6, 7, 10, 21)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

def solution():
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 == 6:
		if n > 6 + 10 + 15:
			print('YES')
			print(10, 6, 15, n - (6 + 10 + 15))
		else:
			print('NO')
	elif n - 30 == 10:
		if n > 6 + 10 + 15:
			print('YES')
			print(6, 10, 15, n - (6 + 10 + 15))
		else:
			print('NO')
	elif n - 30 == 14:
		if n > 6 + 10 + 15:
			print('YES')
			print(6, 10, 15, n - (6 + 10 + 15))
		else:
			print('NO')
	elif n - 30 > 0:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solution()


test_cases = int(input())
final = []
for i in range(test_cases):
	n = int(input())
	if n < 31:
		final.append(['NO'])
	elif n == 36:
		final.append(['YES'])
		final.append([1, 6, 14, 15])
	elif n == 40:
		final.append(['YES'])
		final.append([5, 6, 14, 15])
	elif n == 44:
		final.append(['YES'])
		final.append([6, 9, 14, 15])
	else:
		final.append(['YES'])
		ass = n - 30
		final.append([6, 10, 14, ass])
for i in range(len(final)):
	print(*final[i])


from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		a = 6
		b = 10
		c = 14
		k = n - 30
		if k == 6:
			a = 6
			b = 10
			c = 15
			k = 5
		elif k == 10:
			a = 6
			b = 10
			c = 15
			k = 9
		elif k == 14:
			a = 6
			b = 10
			c = 15
			k = 13
		print(a, b, c, k)


t = int(input())
for i in range(t):
	n = int(input())
	if n > 30:
		print('YES')
		if n == 36:
			print('6 10 15 5')
		elif n == 40:
			print('6 10 22 2')
		elif n == 44:
			print('6 15 21 2')
		else:
			print('6 10 14', n - 30)
	else:
		print('NO')


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		A = [14, 10, 6]
		print('YES')
		if n - 30 in A:
			print(15, 10, 6, n - 31)
		else:
			print(14, 10, 6, n - 30)


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		n = inp()
		if n <= 30:
			print('NO')
		else:
			print('YES')
			if n == 36:
				pr_list([5, 6, 10, 15])
			elif n == 44:
				pr_list([6, 7, 10, 21])
			elif n == 40:
				pr_list([6, 10, 22, 2])
			else:
				pr_list([6, 10, 14, n - 30])
main()


for i in range(int(input())):
	n = int(input())
	if n == 36:
		print('YES')
		print('6 10 15 5')
	elif n == 40:
		print('YES')
		print('6 10 15 9')
	elif n == 44:
		print('YES')
		print('6 10 15 13')
	elif n > 30:
		print('YES')
		print('6 10 14', n - 30)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		br = 1
	else:
		print('YES')
		k = abs(30 - n)
		if k == 6:
			print('5 6 10 15')
		elif k == 10:
			print('15 6 10 9')
		elif k == 14:
			print('6 7 10 21')
		else:
			print('6 14 10', k)


for itr in range(int(input())):
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 not in set([6, 10, 14]):
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)
	else:
		print('NO')


import sys

def main():
	T = int(sys.stdin.readline())
	for t in range(T):
		n = int(sys.stdin.readline())
		if n > 30 and n - 30 not in {6, 10, 14}:
			print('YES')
			print(f'6 10 14 {n - 30}')
		elif n > 31 and n - 31 not in {6, 10, 15}:
			print('YES')
			print(f'6 10 15 {n - 31}')
		else:
			print('NO')
main()


for o in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		a = n - 30
		if n - 30 == 14:
			print('6 10 15 13')
		elif n - 30 == 10:
			print('6 14 15 5')
		elif n - 30 == 6:
			print('6 5 10 15')
		else:
			s = '6 10 14 ' + str(n - 30)
			print(s)


t = int(input())
while t > 0:
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36 or n == 40 or n == 44:
		print('YES')
		print('6', '10', '15', n - 31)
	else:
		print('YES')
		print('6', '10', '14', n - 30)
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	lst = [6, 10, 14]
	s = sum(lst)
	e = abs(n - s)
	if s >= n:
		print('NO')
	else:
		print('YES')
		if e in lst:
			lst[2] = 15
			e -= 1
			print(lst[0], lst[1], lst[2], e)
		else:
			print(lst[0], lst[1], lst[2], e)


t = int(input())
while t > 0:
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 == 6:
		print('YES')
		print(5, 6, 10, 15)
	elif n - 30 == 10:
		print('YES')
		print(10, 14, 15, 1)
	elif n - 30 == 14:
		print('YES')
		print(10, 14, 15, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)
	t -= 1


t = int(input().split()[0])
for case in range(t):
	n = int(input().split()[0])
	if n <= 30:
		print('NO')
		continue
	if n == 36:
		print('YES')
		print('5 6 10 15')
		continue
	if n == 40:
		print('YES')
		print('6 9 10 15')
		continue
	if n == 44:
		print('YES')
		print('6 10 13 15')
		continue
	print('YES')
	print('6 10 14 ' + str(n - 30))


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 not in set([6, 10, 14]):
		print('YES')
		print(*sorted([6, 10, 14, n - 30]))
	else:
		print('YES')
		print(*sorted([6, 10, 15, n - 31]))


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	elif n - 30 == 6:
		print('YES')
		print(15, 6, 10, 5)
	elif n - 30 == 10:
		print('YES')
		print(15, 14, 10, 1)
	elif n - 30 == 14:
		print('YES')
		print(15, 10, 14, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


t = int(input())
lst = []
for i in range(t):
	n = int(input())
	lst.append(n)
for n in lst:
	if n > 44:
		print('YES')
		print(14, 10, 6, n - 30)
	elif n < 31:
		print('NO')
	elif n - 30 not in [14, 10, 6, 0]:
		print('YES')
		print(14, 10, 6, n - 30)
	else:
		print('YES')
		print(15, 10, 6, n - 31)


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	n = int(stdin.readline())
	if n < 31:
		stdout.write('NO\n')
	elif n == 40:
		stdout.write('YES\n')
		stdout.write('6 10 22 ' + str(n - 38) + '\n')
	elif n == 44:
		stdout.write('YES\n')
		stdout.write('6 10 21 7\n')
	elif n == 36:
		stdout.write('YES\n')
		stdout.write('5 6 10 15\n')
	else:
		stdout.write('YES\n')
		stdout.write('6 10 14 ' + str(n - 30) + '\n')


n = int(input())
for i in range(n):
	t = int(input())
	a = 6
	b = 10
	c = 14
	d = t - 30
	if d <= 0:
		print('NO')
	else:
		if d == a or d == b or d == c:
			c += 1
			d -= 1
		print('YES')
		print(a, b, c, d)


import sys
input = sys.stdin.readline
l = [6, 10, 14, 15, 21, 22, 26, 33]
for _ in range(int(input())):
	n = int(input())
	for i in range(8):
		for j in range(i + 1, 8):
			for k in range(j + 1, 8):
				x = [l[i], l[j], l[k]]
				if n - sum(x) not in x and n - sum(x) > 0:
					print('YES')
					print(*x, n - sum(x))
					f = 0
					break
			else:
				continue
			break
		else:
			continue
		break
	else:
		print('NO')


(z, zz, dgraphs) = (input, lambda : list(map(int, z().split())), {})
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(num):
	n = int(z())
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
		continue
	if n == 44:
		print('YES')
		print(6, 7, 10, 21)
		continue
	if n == 40:
		print('YES')
		print(15, 14, 10, 40 - 14 - 15 - 10)
		continue
	t1 = 6
	t2 = 10
	t3 = 14
	t = 6 + 10 + 14
	if n <= t:
		print('NO')
		continue
	print('YES')
	print(t1, t2, t3, n - t)


n = int(input())
for i in range(n):
	t = int(input())
	if t < 31:
		print('NO')
	elif t == 36 or t == 40 or t == 44:
		print('YES')
		print('15 10 6 ')
		print(t - 31)
	else:
		print('YES')
		print('14 10 6 ')
		print(t - 30)


test = int(input())
for i in range(test):
	n = int(input())
	x = 10 + 6 + 14 + 1
	p = n - x
	if n >= x:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print('6 10 15 {}'.format(p))
		else:
			print('6 10 14 {}'.format(p + 1))
	else:
		print('NO')


import math

def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	n = ii()
	if n < 31:
		print('NO')
	else:
		print('YES')
		arr = [6, 10, 14]
		if n - 30 not in arr:
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			high = mid
		else:
			low = mid + 1
	return low

def check(time, x, y, n):
	time -= min(x, y)
	if time < 0:
		return False
	return time // x + time // y + 1 >= n
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	n = int(input())
	if n <= 30:
		print('NO')
		return
	print('YES')
	if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
		print(6, 10, 15, n - 31)
		return
	print(6, 10, 14, n - 30)
for _ in range(int(input())):
	solve()


from math import sin, pi

def main():
	t = int(input())
	pr = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35]
	for c in range(t):
		n = int(input())
		ans = None
		for x in pr:
			for y in pr:
				for z in pr:
					k = n - x - y - z
					if x + y + z < n and len(set([x, y, z, k])) == 4:
						ans = [x, y, z, k]
		if ans == None:
			print('NO')
		else:
			print('YES')
			print(' '.join([str(x) for x in ans]))
main()


for i in range(int(input())):
	a = int(input())
	nums = [6, 10, 14, a - 30]
	if len(set(nums)) == 3:
		nums[2] += 1
		nums[3] -= 1
	if a > 30:
		print('YES')
		print(*nums)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n - 30 > 0:
		print('Yes')
		if n - 30 in {6, 10, 14}:
			print('{} {} {} {}'.format(6, 10, 15, n - 31))
		else:
			print('{} {} {} {}'.format(6, 10, 14, n - 30))
	else:
		print('No')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			print('YES')
			if n == 36:
				print(6, 10, 15, 5)
			elif n == 40:
				print(6, 14, 15, 5)
			elif n == 44:
				print(6, 10, 15, 13)
			else:
				print(6, 10, 14, n - 30)
main()


def solve():
	number = int(input())
	a = 6
	b = 10
	c = 14
	sum = 30
	if number > sum:
		print('YES')
		number -= sum
		if number == a or number == b or number == c:
			c = 15
			number -= 1
		print(a, b, c, number)
	else:
		print('NO')
T = int(input())
for i in range(T):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6:
			print(2 * 3, 2 * 5, 3 * 5, n - 31)
		elif n - 30 == 10:
			print(2 * 3, 2 * 7, 3 * 5, n - 35)
		elif n - 30 == 14:
			print(2 * 3, 2 * 5, 3 * 5, n - 31)
		else:
			print(2 * 3, 2 * 5, 2 * 7, n - 30)


import math
import os
import random
import re
import string
from sys import *
from collections import *

def solve():
	for _ in range(int(stdin.readline())):
		n = int(input())
		if n >= 31:
			print('YES')
			if n - 30 in [6, 10, 14]:
				print(6, 10, 15, n - 31)
			else:
				print(6, 10, 14, n - 30)
		else:
			print('NO')
solve()


def sieve(n):
	num = [True] * (n + 1)
	i = 2
	primes = []
	while i * i < n + 1:
		if num[i]:
			j = i * i
			while j <= n:
				num[j] = False
				j += i
		i += 1
	for i in range(2, n + 1):
		if num[i]:
			primes.append(i)
	return primes
p = sieve(100000 + 10)
c = []
l = len(p)
i = 0
while i < l:
	j = i + 1
	if p[i] * p[i + 1] > 100000 + 10:
		break
	while j < l:
		if p[i] * p[j] > 100000 + 10:
			break
		c += (p[i] * p[j],)
		j += 1
	i += 1
c.sort()
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		j = 2
		while j < len(c):
			if 16 + c[j] < n:
				d = n - 16 - c[j]
				if d not in [6, 10, c[j]]:
					print(6, 10, c[j], d)
					break
			j += 1


t = int(input())
for i in range(t):
	n = int(input())
	p = [6, 10, 14, 15, 21]
	if n < 31:
		print('NO')
	else:
		x = n - 30
		if x not in p:
			print('YES')
			print(p[0], p[1], p[2], x)
		else:
			x = n - 31
			if x not in p:
				print('YES')
				print(p[0], p[1], p[3], x)
			else:
				x = n - 37
				print('YES')
				print(p[0], p[1], p[4], x)


def solution():
	n = int(input())
	ans = [6, 10, 14]
	if n - 30 > 0 and n - 30 not in ans:
		print('YES')
		print(f'6 10 14 {n - 30}')
		return
	if n == 36:
		print('YES')
		print(f'6 10 15 5')
	elif n == 40:
		print('YES')
		print('1 10 14 15')
	elif n == 44:
		print('YES')
		print('21 15 6 2')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solution()


t = int(input())
for tt in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('No')
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n == 44:
		print('YES')
		print(6, 10, 15, 13)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('No')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 9 10 15')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		x = n - 30
		print('6 10 14', x)


d1 = [6, 10, 14]
d2 = [6, 10, 15]
sd1 = sum(d1)
sd2 = sum(d2)
for _ in range(int(input())):
	x = int(input())
	if x <= sd1:
		print('NO')
		continue
	print('YES')
	if x - sd1 not in d1:
		print(*d1, x - sd1)
	else:
		print(*d2, x - sd2)


import sys
import heapq

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		flag = False
		prime = [2, 3, 5, 7, 11, 13, 17]
		nearPrime = [6, 10, 14]
		ans = []
		ans.sort()
		if n <= 30:
			print('NO')
		else:
			print('YES')
			if n - 30 in nearPrime:
				print(6, 10, 15, n - 31)
			else:
				print(6, 10, 14, n - 30)
	return
main()


for test in range(0, int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(10, 14, 15, 1)
	elif n == 44:
		print('YES')
		print(10, 14, 15, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


n = int(input())
for _ in range(n):
	as1 = int(input())
	if as1 <= 30:
		print('NO')
	elif as1 - 30 == 6 or as1 - 30 == 10 or as1 - 30 == 14:
		print('YES')
		print(6, 10, 15, as1 - 31)
	else:
		print('YES')
		print(6, 10, 14, as1 - 30)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - (6 + 10 + 14))


t = int(input())
while t:
	t -= 1
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 != 14 and n - 30 != 10 and (n - 30 != 6):
			print('14 10 6 ' + str(n - 30))
		else:
			print('15 10 6 ' + str(n - 31))


tests = int(input())
for t in range(tests):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 40:
			res = [6, 14, 15, 5]
		elif n == 44:
			res = [6, 10, 15, 13]
		elif n == 36:
			res = [5, 6, 10, 15]
		else:
			res = [6, 10, 14, n - 30]
		print(' '.join(list(map(str, res))))


for i in range(int(input())):
	n = int(input())
	a = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		if n > 30 and n <= 44:
			b = n - sum(a)
			if b in a:
				a.remove(14)
				a.append(15)
				c = n - sum(a)
				a.append(c)
			else:
				a.append(b)
		else:
			n = n - sum(a)
			a.append(n)
		print('YES')
		print(*a)


l = [6, 10, 14, 15]
s = [30, 31, 35, 39]
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	val = n - 30
	if val in [6, 10, 14]:
		print(6, 10, 15, val - 1)
	else:
		print(6, 10, 14, val)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6:
			print(6, 10, 15, 5)
		elif n - 30 == 10:
			print(6, 10, 15, 9)
		elif n - 30 == 14:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)


T = int(input())
for _ in range(T):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		s = [6, 10, 14]
		if n - 30 in s:
			print('YES')
			print(2 * 3, 2 * 5, 3 * 5, n - 31)
		else:
			print('YES')
			print(2 * 3, 2 * 5, 2 * 7, n - 30)


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	x = n - 6 - 10 - 14
	if x == 6 or x == 10:
		print(6, 10, 15, x - 1)
	elif x == 14:
		print(6, 10, 21, n - 6 - 10 - 21)
	else:
		print(6, 10, 14, x)


def verif_nearlyprime(n):
	if verif_prime(n) == True:
		return False
	else:
		l = list()
		l = [i for i in range(2, n // 2 + 1) if n % i == 0]
		test = False
		j = 0
		k = len(l) - 1
		while test == False and j <= k:
			if verif_prime(l[k]) == True and verif_prime(l[j]) == True:
				test = True
			else:
				j = j + 1
				k = k - 1
		return test

def verif_prime(n):
	if n == 1:
		return True
	else:
		i = 2
		test = True
		while i <= n // 2 and test:
			if n % i == 0:
				test = False
			else:
				i = i + 1
		return test
t = int(input())
l = list()
for i in range(t):
	n = int(input())
	l.append(n)
for i in l:
	l1 = [6, 10, 14]
	if i <= 30:
		print('no')
	else:
		r = i - 30
		if (r in l1) == False:
			l1.append(r)
		else:
			j = l1[-1] + 1
			k = 1
			while verif_nearlyprime(j) == False:
				j = j + 1
				k = k + 1
			l1[-1] = j
			l1.append(r - k)
		print('yes')
		print(l1[0], l1[1], l1[2], l1[3])


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
arr = [6, 10, 14, 1]
for _ in range(I()):
	p = I()
	if p < sum(arr):
		print('NO')
	else:
		print('YES')
		e = p - sum(arr[:3])
		if e in arr[:3]:
			arr[2] += 1
			print(e - 1, *arr[:3])
			arr[2] -= 1
		else:
			print(e, *arr[:3])


def nearPrime(N):
	if N <= 30:
		print('NO')
	else:
		print('YES')
		if N == 36 or N == 40 or N == 44:
			print(6, 10, 15, N - 31)
		else:
			print(6, 10, 14, N - 30)
for i in range(int(input())):
	N = int(input())
	nearPrime(N)


t = int(input())
a = 14
b = 10
c = 6
d = 15
s = a + b + c
for _ in range(t):
	n = int(input())
	if n <= s:
		print('NO')
		continue
	else:
		print('YES')
	if (n - s == a or n - s == b or n - s == c) and n - (c + b + d) > 0:
		print(c, b, d, n - (c + b + d))
	elif n - s == a or n - s == b or n - s == c:
		print('NO')
	else:
		print(a, b, c, n - s)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	if n - 30 not in [6, 10, 14]:
		print(6, 10, 14, n - 30)
	else:
		print(6, 10, 15, n - 31)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		n -= 30
		if n != 6 and n != 10 and (n != 14):
			print('YES')
			print(6, 10, 14, n)
		elif n == 10:
			print('YES')
			print(6, 10, 21, 3)
		elif n == 14:
			print('YES')
			print(6, 10, 21, 7)
		elif n == 6:
			print('YES')
			print(5, 6, 10, 15)
		else:
			print('NO')


for t in range(int(input())):
	n = int(input())
	ans = [6, 10, 0, 0]
	n = n - 16
	if n < 15:
		print('NO')
	else:
		ans = [6, 10, 14, n - 14]
		if 6 == n - 14:
			print('YES')
			print(*[5, 6, 10, 15])
		elif 10 == n - 14:
			print('YES')
			print(*[5, 6, 14, 15])
		elif 14 == n - 14:
			print('YES')
			print(*[6, 10, 13, 15])
		else:
			print('YES')
			print(*ans)


from sys import stdin, stdout

def input():
	return stdin.readline().strip()

def solve():
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(f'6 10 15 {n - 31}')
		else:
			print(f'6 10 14 {n - 30}')
t = int(input())
for _ in range(t):
	solve()


import sys
import math
from math import *
from collections import defaultdict
import os
import sys
from io import BytesIO, IOBase
from collections import deque

def main():
	arr = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 39, 42]
	n = int(input())
	f = False
	if n <= 30:
		print('NO')
		return
	for j in range(7 - 3):
		a = arr[j]
		b = arr[j + 1]
		c = arr[j + 2]
		t = a + b + c
		for i in range(j + 3, 7):
			if t > n:
				break
			if n - t == a or n - t == b or n - t == c:
				t -= c
				c = arr[i]
				t += c
			else:
				f = True
				break
		if f:
			break
	if f:
		print('YES')
		print(a, b, c, n - t)
	else:
		print('NO')
for i in range(int(input())):
	main()


from sys import stdin
ip = stdin.readline
for _ in range(int(ip())):
	n = int(ip())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		diff = n - 30
		if diff == 14:
			print('5 10 14 15')
		elif diff == 6:
			print('5 6 10 15')
		elif diff == 10:
			print('1 10 14 15')
		else:
			print('6 10 14', diff)


t = int(input())
for _ in range(t):
	n = int(input())
	primes = [6, 10, 14]
	if n > 30:
		if n - 30 in primes:
			print('YES')
			primes[-1] = 15
			primes.append(n - 31)
			print(*primes)
		else:
			print('YES')
			print(f'{6} {10} {14} {n - 30}')
	else:
		print('NO')


t = int(input())
for t1 in range(t):
	n = int(input())
	prime = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39]
	if n <= 30:
		print('NO')
	else:
		nj = 2
		while nj <= 10:
			if n > 16 + prime[nj] and n - (16 + prime[nj]) not in [6, 10, prime[nj]]:
				print('YES')
				print(6, 10, prime[nj], n - (16 + prime[nj]))
				break
			elif nj == 10:
				print('NO')
				break
			else:
				nj += 1
				continue


def solve():
	n = int(input())
	if n < 31:
		print('NO')
		return
	z = n - 30
	if z == 10 or z == 6:
		print('YES')
		print(6, 10, 15, n - 31)
		return
	if z == 14:
		print('YES')
		print(6, 10, 26, 2)
		return
	print('YES')
	print(6, 10, 14, n - 30)
for _ in range(int(input())):
	solve()


import sys
lines = sys.stdin.read().splitlines()
lincnt = -1

def line():
	global lincnt
	lincnt += 1
	return lines[lincnt]
nums = [6, 10, 14]
for _ in range(int(line())):
	n = int(line())
	if n > sum(nums):
		d = n - sum(nums)
		if d in nums:
			print('YES', d - 1, 6, 10, 15)
		else:
			print('YES', d, 6, 10, 14)
	else:
		print('NO')


import sys, math
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
t = inp()
for _ in range(t):
	n = inp()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(1, 10, 14, 15)
		elif n == 44:
			print(5, 10, 14, 15)
		else:
			print(6, 10, 14, n - 30)


def factors(n):
	gaps = [1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6]
	(length, cycle) = (11, 3)
	(f, fs, nxt) = (2, [], 0)
	while f * f <= n:
		while n % f == 0:
			fs.append(f)
			n /= f
		f += gaps[nxt]
		nxt += 1
		if nxt == length:
			nxt = cycle
	if n > 1:
		fs.append(n)
	if len(fs) == 2 and len(set(fs)) == 2:
		return True
	else:
		return False
for i in range(int(input())):
	flag = 0
	n = int(input())
	l = []
	if n == 36:
		l.append(6)
		l.append(10)
		l.append(15)
		flag = 1
	if flag == 0:
		for i in range(1, n + 1):
			if factors(i):
				l.append(i)
			if len(l) == 3:
				if n < 50:
					z = sum(l)
					k = n - z
					if k not in l:
						flag = 1
						break
					else:
						l.remove(k)
				else:
					flag = 1
					break
	if len(l) != 3:
		print('NO')
	else:
		z = sum(l)
		k = n - z
		if k > 0:
			print('YES')
			l.append(k)
			print(*l)
		else:
			print('NO')


for case in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		d = n - 30
		if d in [6, 10, 14]:
			print(6, 10, 15, d - 1)
		else:
			print(6, 10, 14, d)


for _ in range(int(input())):
	n = int(input())
	shit = n - 30
	if n == 36:
		print('YES')
		print(6, 10, 15, 5)
		continue
	if n == 40:
		print('YES')
		print(6, 10, 15, 9)
		continue
	if n == 44:
		print('YES')
		print(6, 10, 15, 13)
		continue
	if n > 30:
		print('YES')
		print(6, 10, 14, shit)
	else:
		print('NO')


tests = int(input())
for test in range(tests):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n > 30 and n - 30 != 6 and (n - 30 != 10) and (n - 30 != 14):
		print('YES')
		print(14, 10, 6, n - 30)
	else:
		print('YES')
		print(15, 10, 6, n - 31)


for _ in range(int(input())):
	dp1 = [6, 10, 14, 15]
	n = int(input())
	m = sum(dp1[0:3])
	if m >= n:
		print('NO')
	else:
		ans = n - m
		if dp1.count(ans) >= 1:
			if m + 1 < n:
				print('YES')
				print(dp1[0], end=' ')
				print(dp1[1], end=' ')
				print(dp1[3], end=' ')
				print(n - (m + 1))
			else:
				print('NO')
		else:
			print('YES')
			print(dp1[0], end=' ')
			print(dp1[1], end=' ')
			print(dp1[2], end=' ')
			print(ans)


import sys
input = sys.stdin.readline

def solution():
	N = int(input())
	ret = [6, 10, 14]
	S = sum(ret)
	if N - S in ret:
		ret.pop()
		ret.append(15)
		S = sum(ret)
	if N <= S:
		print('NO')
	else:
		print('YES')
		ret.append(N - S)
		print(*ret)
T = int(input())
for _ in range(T):
	solution()


for i in range(int(input())):
	n = int(input())
	if n > 30:
		x = n - 30
		y = 14
		if x == 14 or x == 6 or x == 10:
			y = y + 1
			x = x - 1
		print('YES')
		print('6 10 ', end='')
		print(y, end=' ')
		print(x)
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	if n > 30 and n - 30 != 6 and (n - 30 != 10) and (n - 30 != 14):
		print('YES')
		print(6, 10, 14, n - 30)
	elif n > 31 and n - 31 != 6 and (n - 31 != 10) and (n - 31 != 15):
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('NO')


flag = [1] * 10 ** 2
f = list()
for i in range(2, 10 ** 2):
	if flag[i]:
		f.append(i)
		tmp = i
		while i * tmp < 10 ** 2:
			flag[i * tmp] = 0
			tmp += 1
g = []
for (i, x) in enumerate(f):
	for y in f[i + 1:]:
		if x * y > 2 * 10 ** 5:
			break
		g.append(x * y)
g.sort()
g = g[:10]
t = int(input())
for _ in range(t):
	n = int(input())
	flag = False
	for i in range(10):
		for j in range(i + 1, 10):
			for k in range(j + 1, 10):
				tmp = n - g[i] - g[j] - g[k]
				if tmp > 0 and tmp not in [g[i], g[j], g[k]]:
					print('YES')
					print(tmp, g[i], g[j], g[k])
					flag = True
					break
			if flag:
				break
		if flag:
			break
	if not flag:
		print('NO')


import io, os
from collections import deque
import bisect
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	n = int(input())
	if n == 40:
		ans = [6, 10, 15, 9]
	elif n == 36:
		ans = [6, 10, 15, 5]
	elif n == 44:
		ans = [6, 10, 21, 7]
	else:
		ans = [6, 10, 14, n - 30]
	if n < 31:
		print('NO')
	else:
		print('YES')
		print(*ans)


for _ in range(int(input())):
	n = int(input())
	a = [6, 10, 14, n - 30]
	if n in [36, 40, 44]:
		a[2] += 1
		a[3] -= 1
	if n > 30:
		print('YES')
		print(*a)
	else:
		print('NO')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	n = int(inputi())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		df = n - 30
		if df == 6 or df == 10 or df == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


t = int(input())
for _ in range(t):
	n = int(input())
	if n > 30:
		a = 6
		b = 10
		c = 14
		d = n - 30
		if d == 6:
			c = 15
			d = 5
		if d == 10:
			c = 15
			d = 9
		if d == 14:
			c = 15
			d = 13
		print('YES')
		print('{} {} {} {}'.format(a, b, c, d))
	else:
		print('NO')


for z in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 14, 15, 5)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)


import sys
import math
t = int(input())
a = [6, 10, 14, 15, 21]
while t > 0:
	t -= 1
	n = int(input())
	flag = 0
	for i in range(0, len(a)):
		if flag:
			break
		for j in range(i + 1, len(a)):
			if flag:
				break
			for z in range(j + 1, len(a)):
				if flag:
					break
				x = n - a[i] - a[j] - a[z]
				if x == a[i] or x == a[j] or x == a[z] or (x <= 0):
					continue
				flag = 1
				print('YES')
				print(a[i], a[j], a[z], x)
	if flag == 0:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	lis = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n >= 45:
			print(6, 14, 10, n - 30)
		else:
			x = n - 30
			if n == 36:
				lis = [15, 6, 10, 5]
			elif x in lis:
				lis.remove(x)
				lis.append(15)
				lis.append(n - sum(lis))
			else:
				lis.append(x)
			print(*lis)
			lis = [6, 10, 14]


import math, sys

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))
t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n not in [36, 40, 44]:
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def sieve():
	li = [True] * (2 * 10 ** 5 + 5)
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(2 * 10 ** 5 + 5):
		if li[i] == True:
			prime.append(i)
	return prime

def solve():
	ini = 6 + 10 + 14
	n = II()
	if n <= ini:
		print('NO')
	else:
		val = n - ini
		print('YES')
		if val == 6:
			print(*[6, 10, 15, 5])
		elif val == 10:
			print(*[6, 10, 22, 2])
		elif val == 14:
			print(*[6, 10, 26, 2])
		else:
			print(*[6, 10, 14, val])
	return
t = II()
for i in range(t):
	solve()


from queue import LifoQueue

def print_sol(c, sol):
	print('Case #{}: {}'.format(c, sol))

def rd_int():
	return int(input())

def rd_str():
	return input()

def rd_str_lst():
	return input().split(' ')

def sp_str_lst():
	return list(input())

def rd_int_lst():
	return [int(i) for i in rd_str_lst()]

def sp_int_lst():
	return [int(i) for i in sp_str_lst()]

def dfs(g, i, v):
	v[i] = True
	for j in g[i]:
		if not v[j]:
			dfs(g, j, v)
	print(i)

def dfs_iter(g, i, n):
	v = [False] * n
	stack = LifoQueue()
	stack.put(i)
	while stack.not_empty:
		u = stack.get()
		v[u] = True
		print(u)
		for i in g[u]:
			if not v[i]:
				stack.put(i)

def main():
	t = rd_int()
	for c in range(1, t + 1):
		n = rd_int()
		if n < 31:
			print('NO')
		elif n == 36 or n == 40 or n == 44:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
main()


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq, random

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_le(a, x):
	i = bi.bisect_right(a, x)
	if i:
		return i - 1
	else:
		return -1

def main():
	try:
		l = [6, 10, 14, 15, 22, 35, 55]
		n = I()
		if n <= 30:
			no()
		else:
			ans = [6, 10]
			n -= 16
			for x in range(2, len(l)):
				temp = n - l[x]
				if temp != l[x] and temp != 6 and (temp != 10):
					ans.append(l[x])
					ans.append(temp)
					break
			if len(ans) != 4:
				no()
			else:
				yes()
				print(*ans)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


for _ in range(int(input())):
	n = int(input())
	res = [6, 10, 14]
	if sum(res) < n:
		if n - sum(res) not in res:
			res.append(n - sum(res))
		else:
			tmp = n - sum(res)
			if tmp == 6:
				res = [6, 10, 15]
				res.append(n - sum(res))
			elif tmp == 10:
				res = [6, 10, 15]
				res.append(n - sum(res))
			elif tmp == 14:
				res = [6, 10, 15]
				res.append(n - sum(res))
	else:
		print('NO')
	if len(res) == 4:
		print('YES')
		print(*res)


for _ in range(int(input())):
	n = int(input())
	(a, b, c, d, e, f) = (6, 10, 14, 15, 21, 26)
	if n - a - b - c <= 0:
		print('NO')
	else:
		print('YES')
		if n - a - b - c == a or n - a - b - c == b or n - a - b - c == c:
			print(a, b, d, n - a - b - c - 1)
		else:
			print(a, b, c, n - a - b - c)


tc = int(input())
l = [6, 10, 14, 15, 21, 22, 26]
check = [[]] * 46
le = len(l)
for x in range(le - 2):
	for y in range(x + 1, le - 1):
		for z in range(y + 1, le):
			for t in range(1, 45 - l[x] - l[y] - l[z]):
				if t != l[x] and t != l[y] and (t != l[z]):
					check[l[x] + l[y] + l[z] + t] = [l[x], l[y], l[z], t]
for i in range(tc):
	n = int(input())
	if n >= 45:
		print('YES')
		print(6, 10, 14, n - 30)
	elif len(check[n]) > 0:
		print('YES')
		print(' '.join(list(map(str, check[n]))))
	else:
		print('NO')


test = int(input())
for i in range(test):
	n = int(input())
	prime = [6, 10, 14, 15]
	if n <= 30:
		print('NO')
	elif n in [36, 44, 40]:
		print('YES')
		print(15, 10, 6, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


import math
t = int(input())
for w in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


def test_case():
	n = int(input())
	if n <= 30:
		print('NO')
		return
	elif n in (36, 40, 44):
		print('YES')
		print(6, 10, 15, n - 6 - 10 - 15)
	else:
		print('YES')
		print(6, 10, 14, n - 6 - 10 - 14)
T = int(input())
for _ in range(T):
	test_case()


t = int(input())
for i in range(t):
	n = int(input())
	ar = []
	flag = 0
	a = 6
	for j in range(3):
		n -= a
		ar.append(a)
		if n <= 0:
			flag = 1
			break
		if a == 6:
			a = 10
		elif a == 10:
			a = 14
	if flag == 1:
		print('NO')
	elif n != ar[0] and n != ar[1] and (n != ar[2]):
		print('YES')
		print(ar[0], ar[1], ar[2], n)
	else:
		ar[2] = 15
		n -= 1
		print('YES')
		print(ar[0], ar[1], ar[2], n)


from collections import defaultdict
T = int(input())
last_number = 10 ** 5 * 2
primes = [1] * last_number
primes[0] = -1
primes[1] = -1
for i in range(2, last_number + 1):
	curr = i * 2
	while curr < last_number:
		primes[curr] = 0
		curr += i
d = defaultdict(int)
d[0] = 6
d[1] = 10
d[2] = 14
d[3] = 15
for _ in range(T):
	n = int(input())
	flag = 1
	two = n - d[0] - d[1]
	if two <= 14:
		print('NO')
	elif two - d[2] not in [6, 10, 14]:
		print('YES')
		print('%d %d %d %d' % (d[0], d[1], d[2], two - d[2]))
	else:
		print('YES')
		print('%d %d %d %d' % (d[0], d[1], 15, two - 15))


production = True
import sys, math, collections, bisect, itertools, heapq, decimal, random, copy, re

def input(f=0, m=0):
	if m > 0:
		return [input(f) for i in range(m)]
	else:
		l = sys.stdin.readline()[:-1]
		if f >= 10:
			u = False
			f = int(str(f)[-1])
		else:
			u = True
		if f == 0:
			p = [l]
		elif f == 1:
			p = list(map(int, l.split()))
		elif f == 2:
			p = list(map(float, l.split()))
		elif f == 3:
			p = list(l)
		elif f == 4:
			p = list(map(int, list(l)))
		elif f == 5:
			p = l.split()
		return p if u else p[0]

def out(l, f=0, n=True):
	if f == 0:
		p = str(l)
	elif f == 1:
		p = ' '.join(map(str, l))
	elif f == 2:
		p = '\n'.join(map(str, l))
	elif f == 3:
		p = ''.join(map(str, l))
	print(p, end='\n' if n else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: a + 1 & 1

def mapl(i, f=0):
	if f == 0:
		return list(map(int, i))
	elif f == 1:
		return list(map(str, i))
	elif f == 2:
		return list(map(list, i))

def solve():
	n = input(11)
	if n < 31:
		out('NO')
	else:
		y = n - 30
		a = [6, 10, 14, y]
		if y == 6:
			a = [5, 6, 10, 15]
		elif y == 10:
			a = [6, 15, 10, 9]
		elif y == 14:
			a = [6, 7, 10, 21]
		out('YES')
		out(a, 1)
	return
for i in range(input(11)):
	solve()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
T = inp()
for t in range(T):
	N = inp()
	if N <= 30:
		print('NO')
	elif N == 36:
		print('YES')
		print('5 6 10 15')
	elif N == 40:
		print('YES')
		print('6 10 21 3')
	elif N == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		print('6 10 14 ' + str(N - 30))


t = int(input())
while t:
	n = int(input())
	if n > 30:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(2, 6, 10, 22)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')
	t -= 1


for _ in [0] * int(input()):
	a = int(input())
	j = 1 if a in (36, 44, 40) else 0
	print('YES \n6 10 {x} {y}'.format(x=14 + j, y=a - 30 - j) if a > 30 else 'NO')


import sys
from collections import deque, defaultdict
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def main():
	for _ in range(ii()):
		n = ii()
		if n > 30:
			print('YES')
			a = [6, 10, 14]
			x = n - sum(a)
			if x in a:
				print('6 15 14', n - 6 - 15 - 14)
			else:
				print('6 10 14', n - 6 - 10 - 14)
		else:
			print('NO')
main()


def Solution():
	res = ['6', '10', '15']
	r = ['6', '10', '14']
	t = int(input())
	while t:
		n = int(input())
		if n <= 30:
			print('NO')
		else:
			print('YES')
			if n == 36 or n == 40 or n == 44:
				print(' '.join(res), n - 31)
			else:
				print(' '.join(r), n - 30)
		t -= 1
Solution()


T = int(input())
for i in range(T):
	N = int(input())
	A = [14, 10, 6]
	if N <= 30:
		print('NO')
	else:
		print('YES')
		if N == 36:
			print(5, 6, 10, 15)
		elif N == 40:
			print(6, 14, 15, 5)
		elif N == 44:
			print(6, 10, 15, 13)
		else:
			print(14, 10, 6, N - 30)


for t in range(int(input())):
	n = int(input())
	a = 6
	b = 10
	c = 14
	d = n - a - b - c
	if d == a or d == b or d == c:
		print('Yes')
		print(a, b, 15, d - 1)
	elif d > 0:
		print('Yes')
		print(a, b, c, d)
	else:
		print('No')


t = int(input())
while t:
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 not in [6, 10, 14]:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('YES')
		print(6, 10, 15, n - 31)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	if n > 30:
		if n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
			print('YES')
			print(6, 10, 14, n - (6 + 14 + 10))
		else:
			print('YES')
			print(6, 10, 15, n - 6 - 10 - 15)
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	if n - 30 == 6:
		print('YES')
		print('6 10 15', n - 31)
		continue
	if n - 30 == 14:
		print('YES')
		print('6 10 21', n - 37)
		continue
	if n - 30 == 10:
		print('YES')
		print('6 10 21', n - 37)
		continue
	print('YES')
	print('6 10 14', n - 30)


for i in range(0, int(input())):
	n = int(input())
	l = [6, 10, 14]
	if n <= sum(l):
		print('NO')
	else:
		print('YES')
		if n - sum(l) in l:
			l[-1] += 1
			print(*l, n - sum(l))
		else:
			print(*l, n - sum(l))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print('6 10 15 5')
	elif n == 40:
		print('YES')
		print('6 10 22 2')
	elif n == 44:
		print('YES')
		print('6 10 26 2')
	else:
		print('YES')
		print('6 10 14', n - 30)


N = 10000
PRIME_TABLE = [True for i in range(N + 1)]
PRIME_TABLE[0] = False
PRIME_TABLE[1] = False
for i in range(2, int(N ** (1 / 2)) + 1):
	if PRIME_TABLE[i] is True:
		for j in range(i ** 2, N + 1, i):
			if j > N:
				break
			PRIME_TABLE[j] = False
NEARLY_PRIME = []
for (i, x) in enumerate(PRIME_TABLE):
	if x is True:
		NEARLY_PRIME.append(False)
	else:
		NEARLY_PRIME.append(False)
		for j in range(2, int(i ** (1 / 2)) + 1):
			if PRIME_TABLE[j] is True:
				if i / j % 1 == 0 and PRIME_TABLE[int(i / j)] is True and (i / j != j):
					NEARLY_PRIME[i] = True
					break
NEARLY_PRIME_INDEX = [i for (i, x) in enumerate(NEARLY_PRIME) if x is True]
nb_test_case = int(input())
for i in range(nb_test_case):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n in [36, 40, 44]:
		print('YES')
		print(' '.join(list(map(str, [n - 31, 6, 10, 15]))))
	else:
		print('YES')
		print(' '.join(list(map(str, [n - 30, 6, 10, 14]))))


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	n = IN()
	if n >= 31:
		if n == 36 or n == 40 or n == 44:
			print('YES')
			print(6, 10, 15, n - 31)
			return
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('NO')
for _ in range(IN()):
	case()


def solve():
	x = int(input())
	dif = x - 30
	nums = [6, 10, 14, dif]
	if x > 30:
		if dif == 6:
			nums = [5, 10, 15, 6]
		if dif == 10:
			nums = [6, 14, 15, 5]
		if dif == 14:
			nums = [6, 14, 15, 9]
		print('YES')
		print(*nums)
	else:
		print('NO')

def main():
	t = int(input())
	for i in range(t):
		solve()
main()


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n <= 30:
			print('NO')
			continue
		if n == 36 or n == 40 or n == 44:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
main()


import os
from io import BytesIO
input = BytesIO(os.read(0, os.fstat(0).st_size)).readline

def lii():
	return list(map(int, input().split()))

def ii():
	return int(input())
t = ii()
for _ in range(t):
	n = ii()
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		print('YES')
		left = n - 6 - 10 - 14
		if left in [6, 10, 14]:
			left -= 1
			print(6, 10, 15, left)
		else:
			print(6, 10, 14, left)


import sys
input = sys.stdin.readline
t = int(input())
for ii in range(t):
	n = int(input())
	one = 2 * 3
	two = 2 * 5
	three = 2 * 7
	four = 3 * 5
	pq = n - (one + two + three)
	if n < one + two + three + 1:
		print('NO')
	elif pq == one:
		if n < two + one + four + 1:
			print('NO')
		else:
			print('YES')
			print(four, two, one, n - (four + two + one))
	elif pq == two:
		if n < one + two + four + 1:
			print('NO')
		else:
			print('YES')
			print(four, one, two, n - (four + one + two))
	elif pq == three:
		if n < one + three + four + 1:
			print('NO')
		else:
			print('YES')
			print(four, one, three, n - (four + one + three))
	else:
		print('YES')
		print(one, two, three, n - (one + two + three))


import math
t = int(input(''))
num = []
for i in range(t):
	num.append(int(input('')))

def semiprime(x):
	cnt = 0
	for i in range(2, int(math.sqrt(x)) + 1):
		if x % i == 0 and i != x / i:
			if i == 2 and x / i % 2 == 0:
				break
			cnt += 1
		if cnt > 1:
			break
	if cnt == 1:
		return 1
	else:
		return 0
semprime = []
for i in range(3, 10001):
	if semiprime(i) == 1:
		semprime.append(i)
for i in num:
	if i < 31:
		print('NO')
	else:
		sol = []
		if i == 31:
			sol.append(1)
		else:
			sol.append(i - 31)
		sol.append(semprime[0])
		sol.append(semprime[1])
		sol.append(i - sol[0] - semprime[0] - semprime[1])
		if sol[0] == sol[3]:
			sol[0] = sol[0] + 1
			sol[3] = sol[3] - 1
		elif sol[0] == sol[1]:
			sol[3] = sol[3] - 1
			sol[0] = sol[0] + 1
		elif sol[0] == sol[2]:
			sol[3] = sol[3] - 1
			sol[0] = sol[0] + 1
		print('YES')
		print(*sol)


a = int(input())
for i in range(0, a):
	b = int(input())
	if b > 30:
		print('YES')
		if b - 30 == 6:
			print(5, 6, 10, 15)
		elif b - 30 == 14:
			print(6, 7, 10, 21)
		elif b - 30 == 10:
			print(6, 10, 21, 3)
		else:
			print(6, 10, 14, b - 30)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		sum = 0
		sum += 6
		sum += 10
		sum += 14
		if n - sum == 6 or n - sum == 10 or n - sum == 14:
			sum -= 14
			sum += 15
			x = n - sum
			print('YES')
			print(6, 10, 15, x)
		else:
			x = n - sum
			print('YES')
			print(6, 10, 14, x)


import sys
input = sys.stdin.readline
t = int(input())
A = [int(input()) for i in range(t)]
B = [6, 10, 14]
s = sum(B)
Bs = [B[i] + s for i in range(3)]
for i in range(t):
	if A[i] > s:
		print('YES')
		if A[i] in Bs:
			print(6, 10, 15, A[i] - s - 1)
		else:
			print(6, 10, 14, A[i] - s)
	else:
		print('NO')


import math
for _ in range(int(input())):
	n = int(input())
	a = [6, 10, 14]
	if n < 31:
		print('NO')
	elif n - 30 not in a:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		j = n - 30
		if j == 6:
			if n - 31 > 0:
				print('YES')
				print(6, 10, 15, n - 31)
			else:
				print('NO')
		if j == 10:
			if n - 31 > 0:
				print('YES')
				print(6, 10, 15, n - 31)
			else:
				print('NO')
		if j == 14:
			if n - 31 > 0:
				print('YES')
				print(6, 10, 15, n - 31)
			else:
				print('NO')


for fuck in range(int(input())):
	l = [6, 10, 14]
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			l[2] = 15
			print(*l, n - sum(l))
		else:
			print(*l, n - sum(l))


for s in [*open(0)][1:]:
	n = int(s)
	f = n in (36, 40, 44)
	print(*(['NO'], ['Yes', 6, 10, 14 + f, n - 30 - f])[n > 30])


near = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35]
for _ in range(int(input())):
	n = int(input())
	a1 = [6, 10, 14]
	a2 = [6, 10, 15]
	a3 = [6, 14, 15]
	a4 = [10, 14, 15]
	if n - sum(a1) > 0 and n - sum(a1) not in a1:
		print('YES')
		print(*a1, n - sum(a1))
	elif n - sum(a2) > 0 and n - sum(a2) not in a2:
		print('YES')
		print(*a2, n - sum(a2))
	elif n - sum(a3) > 0 and n - sum(a3) not in a3:
		print('YES')
		print(*a3, n - sum(a3))
	elif n - sum(a4) > 0 and n - sum(a4) not in a4:
		print('YES')
		print(*a4, n - sum(a4))
	else:
		print('NO')


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		d = n - 30
		if d == 14:
			print('YES')
			print(15, 6, 10, 13)
		elif d == 6:
			print('YES')
			print(5, 6, 10, 15)
		elif d == 10:
			print('YES')
			print(6, 14, 15, 5)
		else:
			print('YES')
			print(14, 6, 10, d)


import sys
read = lambda : sys.stdin.readline().strip()
readi = lambda : map(int, read().split())
a = 6
b = 10
c = 14
for _ in range(int(read())):
	num = int(read())
	if num == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif num == 44:
		print('YES')
		print(7, 6, 10, 21)
	elif num == 40:
		print('YES')
		print(9, 6, 10, 15)
	elif num > 30:
		print('YES')
		print(a, b, c, num - 30)
	else:
		print('NO')


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n <= 30:
			print('NO')
		elif n == 36:
			print('YES')
			print(6, 15, 14, 1)
		elif n == 40:
			print('YES')
			print(6, 15, 14, 5)
		elif n == 44:
			print('YES')
			print(6, 15, 14, 9)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
main()


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		l = [6, 10, 14]
		x = n - 30
		if x in l:
			l[2] = 15
			x -= 1
		print(*l, x)


import math
for w in range(int(input())):
	x = int(input())
	if x < 31:
		print('NO')
	else:
		x -= 30
		print('YES')
		if x == 6:
			print(10, 15, 6, 5)
		elif x == 10:
			print(15, 6, 9, 10)
		elif x == 14:
			print(10, 15, 6, 13)
		else:
			print(10, 14, 6, x)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 14, 15, 9)
		else:
			l = [6, 10, 14]
			ll = []
			val = 30
			n = n - val
			l.append(n)
			print(*l)


t = input()
t = int(t)
a = [6, 10, 14]
for i in range(t):
	n = input()
	n = int(n)
	if n > 30:
		print('YES')
		if n - 30 == 6:
			print(6, 10, 15, 5)
		elif n - 30 == 10:
			print(6, 14, 15, 5)
		elif n - 30 == 14:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


from sys import stdin, stdout
import math
from collections import defaultdict
from collections import Counter

def arrinp():
	return [*map(int, stdin.readline().split(' '))]

def mulinp():
	return map(int, stdin.readline().split(' '))

def intinp():
	return int(stdin.readline())

def inp():
	return stdin.readline()

def solution():
	n = intinp()
	if n > 30:
		if n - 30 == 6:
			print('YES')
			print(5, 6, 10, 15)
		elif n - 30 == 10:
			print('YES')
			print(6, 10, 15, 9)
		elif n - 30 == 14:
			print('YES')
			print(6, 10, 15, 13)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')
testcases = 1
testcases = intinp()
for _ in range(testcases):
	solution()


from os import path
import sys
from heapq import heappush, heappop, heapify
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def b(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		n = ii()
		if n <= 30:
			print('NO')
			continue
		print('YES')
		if n == 44:
			print(15, 6, 10, n - 31)
		elif n == 36:
			print(15, 6, 10, n - 31)
		elif n == 40:
			print(15, 6, 10, n - 31)
		else:
			print(14, 6, 10, n - 30)
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		last = n - 30
		if last == 6 or last == 10 or last == 14:
			print('6 10 15 {}'.format(last - 1))
		else:
			print('6 10 14 {}'.format(n - 30))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		(x, y, z) = (2 * 3, 2 * 5, 2 * 7)
		if n == 36:
			print(2 * 5, 2 * 3, 3 * 5, 5)
		elif n == 40:
			print(2 * 3, 2 * 7, 3 * 5, 5)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(x, y, z, n - x - y - z)


for s in [*open(0)][1:]:
	s = int(s)
	res = [6, 10, 14]
	(a, b, c) = res
	if sum(res) > s:
		print('NO')
	else:
		x = s - sum(res)
		if x == 0:
			print('NO')
			continue
		print('YES')
		if x in res:
			print(a, b, c + 1, x - 1)
		else:
			print(*res, x)


n = int(input())
while n > 0:
	m = int(input())
	if m <= 30:
		print('NO')
	if m > 30:
		print('YES')
		var = m - 30
		if var != 6 and var != 10 and (var != 14):
			print(6, 10, 14, var)
		else:
			var -= 1
			print(6, 10, 15, var)
	n -= 1


for _ in range(int(input())):
	t = int(input())
	if t < 31:
		print('NO')
	else:
		print('YES')
		l = [6, 10, 15]
		ll = [6, 10, 14]
		k = t - 31
		if k in l or k == 0:
			ll = [t - 30, 6, 10, 14]
			print(*ll)
		else:
			l = [t - 31, 6, 10, 15]
			print(*l)


for i in range(int(input())):
	n = int(input())
	li = [6, 10, 14]
	if n <= 30:
		print('NO')
		continue
	if n == 36:
		print('YES')
		print('5 6 10 15')
		continue
	if n == 44:
		print('YES')
		print('6 7 10 21')
		continue
	if n == 40:
		print('YES')
		print('6 10 15 9')
		continue
	print('YES')
	print(6, 10, 14, n - 30)


for num in map(int, [*open(0)][1:]):
	if num > 30:
		if num - 30 in (6, 10, 14):
			print('YES\n%d %d %d %d' % (6, 10, 15, num - 31))
		else:
			print('YES\n%d %d %d %d' % (6, 10, 14, num - 30))
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	u = []
	if n <= 30:
		print('NO')
	else:
		print('YES')
		a = n - 30
		if a == 6 or a == 10 or a == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


from sys import stdin, stdout
for i in range(int(stdin.readline().strip())):
	n = int(input())
	if n <= 30:
		stdout.write('NO\n')
	elif n == 36:
		stdout.write('YES\n6 10 15 5\n')
	elif n == 40:
		stdout.write('YES\n6 10 15 9\n')
	elif n == 44:
		stdout.write('YES\n6 10 15 13\n')
	else:
		stdout.write('YES\n6 10 14 ' + str(n - 30) + '\n')


a = int(input())
for i in range(a):
	b = int(input())
	if b <= 30:
		print('NO')
		continue
	c = b - 30
	if b == 36:
		print('Yes')
		print('5 6 15 10')
	elif b == 40:
		print('Yes')
		print('3 6 10 21')
	elif b == 44:
		print('YES')
		print('21 15 6 2')
	elif c in [6, 10, 14]:
		print('NO')
	else:
		print('YES')
		print('6 10 14 {}'.format(b - 30))


def solve():
	n = int(input())
	if n <= 30:
		return 'NO'
	elif n == 44:
		print('YES')
		return f'6 7 10 21'
	elif n == 36:
		print('YES')
		return f'6 10 15 5'
	elif n == 40:
		print('YES')
		return f'5 6 14 15'
	else:
		print('YES')
		return f'6 10 14 {n - 30}'
for _ in range(int(input())):
	print(solve())


for _ in range(int(input())):
	n = int(input())
	a = 6 + 10 + 14
	if n <= 30:
		print('NO')
	else:
		li = [6, 10, 14, n - a]
		print('YES')
		if len(set(li)) == 4:
			print(6, 10, 14, n - a)
		else:
			print(6, 10, 15, n - a - 1)


p = [6, 10, 14]
q = [15]
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		x = n - 6 - 10 - 14
		if x not in p:
			print('YES')
			print(x, 6, 10, 14)
		elif n == 36:
			print('YES')
			print(6, 10, 15, 5)
		elif n == 40:
			print('YES')
			print(10, 14, 15, 1)
		else:
			print('YES')
			print(10, 14, 15, 5)


for _ in range(int(input())):
	n = int(input())
	if 2 * 3 + 2 * 5 + 2 * 7 >= n:
		print('NO')
	else:
		print('YES')
		rem = n - 2 * 3 - 2 * 5 - 2 * 7
		if rem == 2 * 3 or rem == 2 * 5 or rem == 2 * 7:
			print(2 * 3, 2 * 5, 3 * 5, rem - 1)
		else:
			print(2 * 3, 2 * 5, 2 * 7, rem)


MAX = 200001
L = [-1] * MAX
(L[0], L[1]) = (1, 1)
for i in range(2, MAX):
	if L[i] == -1:
		for j in range(i * 2, MAX, i):
			if L[j] == -1:
				L[j] = i
		L[i] = i
l = []
for i in range(6, MAX):
	a = i // L[i]
	if a == L[a] and a != 1 and (L[i] != a):
		l.append(i)
for i in range(int(input())):
	n = int(input())
	c = 0
	s = l[0] + l[1]
	for i in range(2, len(l)):
		if s + l[i] < n and n - (s + l[i]) != l[0] and (n - (s + l[i]) != l[1]) and (n - (s + l[i]) != l[i]):
			print('YES')
			print(l[0], l[1], l[i], n - (s + l[i]))
			c += 1
			break
	if c != 1:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = 6
	b = 10
	c = 14
	d = n - (a + b + c)
	if d == 6 or d == 10 or d == 14:
		c += 1
		d -= 1
	if n < 31:
		print('NO')
	else:
		print('YES')
		print(a, b, c, d)


t = int(input())
min_val = 6 + 10 + 14
for i in range(t):
	x = int(input())
	if x <= min_val:
		print('NO')
		continue
	print('YES')
	val = x - min_val
	if val == 6:
		print('5 6 10 15')
		continue
	if val == 10:
		print('14 10 15 1')
		continue
	if val == 14:
		print('6 7 10 21')
		continue
	else:
		print('6 10 14', val)


n = int(input())
a = []
for i in range(n):
	m = int(input())
	a.append(m)
b = [6, 10, 14]
d = [6, 10, 15]
e = [6, 10, 21]
for i in range(n):
	if sum(b) >= a[i]:
		print('NO')
	elif a[i] - sum(b) not in b:
		print('YES')
		print(6, 10, 14, a[i] - sum(b))
	elif a[i] - sum(d) not in d:
		print('YES')
		print(6, 10, 15, a[i] - sum(d))
	elif a[i] - sum(e) not in e:
		print('YES')
		print(6, 10, 21, a[i] - sum(e))


def nearly_prime(n):
	if n <= 30:
		print('NO')
		return []
	l = [6, 10, 14]
	if n == 36:
		l = [5, 6, 10, 15]
	elif n == 40:
		l = [6, 9, 10, 15]
	elif n == 44:
		l = [6, 7, 10, 21]
	else:
		l.append(n - 30)
	print('YES')
	return l
t = int(input())
for _ in range(t):
	n = int(input())
	result = nearly_prime(n)
	if result:
		print(*result, sep=' ')


def test_cases():
	n = int(input())
	np = [6, 10, 14]
	s = ''
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 in np:
			index = np.index(n - 30)
			pos = 2
			while n - sum(np) in np:
				if n - (sum(np) + 15 - np[pos]) > 1:
					np[pos] = 15
				pos -= 1
		for i in np:
			print(i, end=' ')
		print(n - sum(np))

def start():
	for t in range(int(input())):
		test_cases()
start()


def solve(n):
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(f'6 10 15 {n - 31}')
		else:
			print(f'6 10 14 {n - 30}')
t = int(input())
for i in range(t):
	n = int(input())
	solve(n)


import sys
from math import sqrt
inpt = sys.stdin.readline

def inp():
	return int(inpt())

def inlist():
	return list(map(int, inpt().split()))

def instr():
	s = inpt()
	return list(s[:len(s) - 1])

def invr():
	return map(int, inpt().split())

def main():
	t = inp()
	for l in range(t):
		n = inp()
		if n < 31:
			print('NO')
		else:
			print('YES')
			if n == 36:
				print(5, 6, 10, 15)
			elif n == 40:
				print(6, 5, 14, 15)
			elif n == 44:
				print(6, 7, 10, 21)
			else:
				print(6, 10, 14, n - 30)
main()


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		d = n - 30
		if a == d:
			c = 15
			d = n - a - b - c
		if b == d:
			c = 15
			d = n - a - b - c
		if c == d:
			c = 15
			d = n - a - b - c
		if a <= 0 or b <= 0 or c <= 0 or (d <= 0):
			print('NO')
		else:
			print('YES')
			print(a, b, c, d)


def solution(n):
	if n == 36 or n == 40 or n == 44:
		return 'YES\n6 10 15 ' + str(n - 31)
	return 'YES\n' + ' '.join(['6', '10', '14', str(n - 30)]) if n > 30 else 'NO'
for test_i in range(int(input())):
	print(solution(int(input())))


t = int(input())
for _ in range(t):
	n = int(input())
	if 6 + 10 + 14 >= n:
		print('NO')
	elif n - 30 in [6, 10, 14]:
		if n - 31 > 0:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('NO')
	else:
		print('YES')
		print(6, 10, 14, n - 30)


q = int(input())
for _ in range(q):
	n = int(input())
	a = 6 + 10 + 14
	if n <= a:
		print('NO')
		continue
	k = n - a
	if n == 36:
		print('YES')
		print('5 6 10 15')
		continue
	if n == 40:
		print('YES')
		print('6 15 14 5')
		continue
	if n == 44:
		print('YES')
		print('6 7 10 21')
		continue
	print('YES')
	print('6 10 14', k)


def can(n):
	if n > 30:
		L = [36, 40, 44]
		if n not in L:
			print('YES')
			print(6, 10, 14, n - 30)
		elif n == 36:
			print('YES')
			print(5, 6, 10, 15)
		elif n == 40:
			print('YES')
			print(6, 10, 15, 9)
		elif n == 44:
			print('YES')
			print(6, 7, 10, 21)
	else:
		print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	can(n)


for _ in range(int(input())):
	v = int(input())
	if v < 31:
		print('NO')
	elif v in set([36, 40, 44]):
		print('YES')
		print('6', '10', '15', str(v - 31))
	else:
		print('YES')
		print('6', '10', '14', str(v - 30))


for tt in range(int(input())):
	n = int(input())
	l = [6, 10, 14, 15, 21]
	flag = True
	for i in range(4):
		for j in range(i + 1, 4):
			for k in range(j + 1, 4):
				val = n - l[i] - l[j] - l[k]
				if val > 0 and val != l[i] and (val != l[j]) and (val != l[k]):
					print('YES')
					print(val, l[i], l[j], l[k])
					flag = False
					break
			if flag == False:
				break
		if flag == False:
			break
	if flag:
		print('NO')


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def least_prime_factor(n):
	lp = [0] * (n + 1)
	lp[1] = 1
	for i in range(2, n + 1):
		if lp[i] == 0:
			lp[i] = i
			for j in range(2 * i, n + 1, i):
				if lp[j] == 0:
					lp[j] = i
	return lp

def main():
	s = {6, 10, 14}
	ss = sum(s)
	for _ in range(ri()):
		n = ri()
		if n <= ss:
			ws('NO')
		else:
			ws('YES')
			rem = n - ss
			if rem in s:
				wia([6, 10, 15] + [rem - 1])
			else:
				wia(list(s) + [rem])
main()


t = int(input())
while t:
	n = int(input())
	a = 6
	b = 10
	c = 14
	d = n - (a + b + c)
	if d == a or d == b or d == c:
		c += 1
		d -= 1
	if d > 0:
		print('YES')
		print(a, b, c, d)
	else:
		print('NO')
	t -= 1


from sys import stdin, exit, setrecursionlimit
from collections import deque
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	n = int(input())
	arr = [10, 6, 14]
	if n <= 30:
		print('NO')
	elif n in [40, 36, 44]:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input())
	a = [6, 10, 14, 15]
	ans = []
	for x in a:
		for y in a:
			for z in a:
				m = n - x - y - z
				if m > 0 and len(set([x, y, z, m])) == 4:
					ans = [x, y, z, m]
	if ans:
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
ans = []
almost_simple = [6, 10, 14, 15]
for i in range(t):
	n = int(input())
	res_almost_simple = [6, 10, 14]
	four = n - sum(res_almost_simple)
	if four in res_almost_simple:
		res_almost_simple[2] = 15
	four = n - sum(res_almost_simple)
	if four > 0:
		ans.append(['YES', [*res_almost_simple, four]])
	else:
		ans.append(['NO'])
for item in ans:
	print(item[0])
	if item[0] == 'YES':
		print(*item[1])


t = int(input())
for k in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = 2 * 3 + 2 * 5 + 2 * 7
		remain = n - a
		if remain == 14:
			remain = n - (6 + 10 + 15)
			print('YES')
			print(6, 10, 15, remain)
		elif remain == 10:
			remain = n - (6 + 10 + 15)
			print('YES')
			print(6, 10, 15, remain)
		elif remain == 6:
			remain = n - (6 + 10 + 15)
			print('YES')
			print(6, 10, 15, remain)
		else:
			print('YES')
			print(6, 10, 14, remain)


def main():
	t = int(input())
	k = 2 * 3 + 2 * 5 + 2 * 7
	for _ in range(t):
		n = int(input())
		if n - k > 0:
			m = n - k
			if m == 6:
				print('YES')
				print(6, 10, 15, 5)
			elif m == 10:
				print('YES')
				print(6, 10, 15, 9)
			elif m == 14:
				print('YES')
				print(6, 10, 15, 13)
			else:
				print('YES')
				print(6, 14, 10, m)
		else:
			print('NO')
	return
main()


first_nearly_primes = [6, 10, 14, 15]

def nearly_primes(n):
	if n <= 30:
		return None
	if n == 36:
		return [5, 6, 10, 15]
	elif n == 40:
		return [6, 10, 15, 9]
	elif n == 44:
		return [6, 10, 15, 13]
	return [6, 10, 14, n - 30]
for _ in range(int(input())):
	n = int(input())
	result = nearly_primes(n)
	if not result:
		print('NO')
	else:
		print('YES')
		print(' '.join(map(str, result)))


t = int(input())
for _ in range(t):
	n = int(input())
	nprimes = [6, 10, 14]
	a = sum(nprimes)
	b = n - a
	nprimes.append(b)
	if n == 36 or n == 40 or n == 44:
		nprimes = [6, 10, 15, n - 31]
	if a + b <= 30:
		print('NO')
	else:
		print('YES')
		print(*nprimes, sep=' ')


import sys
sys.setrecursionlimit(10 ** 8)
from types import GeneratorType

def bootstrap(func, stack=[]):

	def wrapped_function(*args, **kwargs):
		if stack:
			return func(*args, **kwargs)
		else:
			call = func(*args, **kwargs)
			while True:
				if type(call) is GeneratorType:
					stack.append(call)
					call = next(call)
				else:
					stack.pop()
					if not stack:
						break
					call = stack[-1].send(call)
			return call
	return wrapped_function
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
res = []
for i in [3, 5, 7]:
	res.append(2 * i)
mult = []
for i in primes:
	for j in primes:
		if i <= j:
			continue
		mult.append(i * j)
chk = sorted(mult)[:15]
sm = sum(res)
for _ in range(int(input())):
	n = int(input())
	if sm > n:
		print('NO')
	elif n < 120:
		f = True
		prim = 0

		@bootstrap
		def check(num):
			if len(num) == 3:
				sm = n - sum(list(num))
				if sm > 0 and sm not in num:
					ans = list(num) + [sm]
					print('YES')
					print(*ans)
					yield True
				yield False
			for i in chk:
				if i not in num:
					s = list(num) + [i]
					if (yield check(set(s))):
						yield True
			yield False
		if check(set()):
			pass
		else:
			print('NO')
	else:
		print('YES')
		print(*res + [n - sm])


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	if N <= 30:
		NO()
	else:
		x = N - 30
		if x in [6, 10, 14]:
			x = N - 31
			YES()
			print(6, 10, 15, x)
		else:
			YES()
			print(6, 10, 14, x)


x = int(input())
for z in range(x):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		c = n - 30
		if c == 6 or c == 10 or c == 14:
			print('YES')
			print(c - 1, 6, 10, 15)
		else:
			print('YES')
			print(c, 6, 10, 14)


s = {6, 10, 14}
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	elif n - 30 not in s:
		print('YES')
		print('6 10 14', end=' ')
		print(n - 30)
	elif n <= 31:
		print('NO')
		continue
	else:
		print('YES')
		print('6 10 15', end=' ')
		print(n - 31)


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j

def fac(n):
	c = 1
	i = 1
	while i <= n:
		c *= i
		i += 1
	return c

def check_happy(n):
	ss = set()
	print(n)
	while n != 1:
		val = n
		s = 0
		print(val)
		while val != 0:
			s += (val % 10) ** 2
			val = val // 10
		print(val)
		print('hi')
		if val in ss:
			return False
		else:
			n = val
			ss.add(n)
	return True

def update(a, b):
	c = 1
	val = a
	while a < b:
		print(c, a)
		c += c
		a += a
	print(1)
	while a > b:
		print()
		a -= val
		c -= 1
	return c
import random as rand

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
from itertools import permutations

def insertion_sort(arr):
	for i in range(len(arr)):
		j = i
		while j > 0:
			if arr[j] < arr[j - 1]:
				temp = arr[j]
				arr[j] = arr[j - 1]
				arr[j - 1] = temp
			j -= 1
	return arr

def quick_sort(arr, low, high):
	i = low
	j = high
	while i < j:
		if arr[i] > arr[low] and arr[j] < arr[low]:
			temp = arr[i]
			arr[i] = arr[j]
			arr[j] = arr[i]
			i += 1
			j -= 1
		elif arr[i] <= arr[low]:
			i += 1
		elif arr[j] >= arr[low]:
			j -= 1
	print(i, j)
	toto = arr[j]
	arr[j] = arr[low]
	arr[low] = toto
	return j

def dodo(arr, low, high):
	if low < high:
		val = quick_sort(arr, low, high)
		dodo(arr, low, val - 1)
		dodo(arr, val + 1, high)
t = int(input())
for i in range(t):
	n = int(input())
	if n <= 6 + 10 + 14:
		print('NO')
	elif n == 44:
		print('YES')
		print(6, 10, 15, 13)
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	else:
		print('YES')
		print(6, 10, 14, n - 6 - 10 - 14)


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	a = 2 * 3
	b = 2 * 5
	c = 2 * 7
	if n > a + b + c:
		if n - (a + b + c) == a or n - (a + b + c) == b or n - (a + b + c) == c:
			d = 3 * 5
			if n > a + b + d:
				print('YES')
				print(a, b, d, n - (a + b + d))
		else:
			print('YES')
			print(a, b, c, n - (a + b + c))
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	combo_1 = [6, 10, 14]
	combo_2 = [6, 10, 15]
	combo_3 = [6, 14, 15]
	combo_4 = [10, 14, 15]
	d1 = n - sum(combo_1)
	d2 = n - sum(combo_2)
	d3 = n - sum(combo_3)
	d4 = n - sum(combo_4)
	ans1 = combo_1 + [d1]
	ans2 = combo_2 + [d2]
	ans3 = combo_3 + [d3]
	ans4 = combo_4 + [d4]
	if n < 31:
		print('NO')
	else:
		print('YES')
		if sum(ans1) == n and len(set(ans1)) == 4:
			print(*ans1)
		elif sum(ans2) == n and len(set(ans2)) == 4:
			print(*ans2)
		elif sum(ans3) == n and len(set(ans3)) == 4:
			print(*ans3)
		else:
			print(*ans4)


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_a(tp):
	return list(r_t(tp))

def main():
	c = int(r())
	for _ in range(c):
		n = int(r())
		if n > 30:
			print('YES')
			if n != 36 and n != 40 and (n != 44):
				print('6 10 14 ' + str(n - 30))
			elif n == 36:
				print('6 15 10 5')
			elif n == 40:
				print('10 22 6 2')
			else:
				print('6 7 10 21')
		else:
			print('NO')
main()


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	s = 6 + 10 + 14
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
		continue
	if n == 40:
		print('YES')
		print(10, 14, 15, 1)
		continue
	if n == 44:
		print('YES')
		print(6, 7, 10, 21)
		continue
	a = n - s
	print('YES')
	print(6, 10, 14, a)


import sys
input = sys.stdin.readline
from collections import *
for _ in range(int(input())):
	n = int(input())
	if n - 30 <= 0:
		print('NO')
	elif n - 30 == 6:
		print('YES')
		print(6, 10, 15, 5)
	elif n - 30 == 10:
		print('YES')
		print(15, 10, 14, 1)
	elif n - 30 == 14:
		print('YES')
		print(15, 10, 14, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


for t in range(int(input())):
	x = int(input())
	if x > 30:
		print('YES')
		if x == 36:
			print(5, 6, 10, 15)
		elif x == 40:
			print(6, 9, 10, 15)
		elif x == 44:
			print(6, 10, 13, 15)
		else:
			print(6, 10, 14, x - 30)
	else:
		print('NO')


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	if n > 30 and n != 36 and (n != 40) and (n != 44):
		print('YES')
		print(6, 10, 14, n - 30)
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n == 44:
		print('YES')
		print(6, 10, 7, 21)
	else:
		print('NO')


from sys import stdin, stdout
q = int(input())
for i in range(q):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 31:
			print(6, 10, 14, 1)
		elif n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, k, m):
	res = 1
	while k > 0:
		if k % 2 == 1:
			res = res * a % m
		a = a * a % m
		k = k // 2
	return res % m

def solution():
	n = int(input())
	if n < 31:
		print('NO')
		return
	diff = n - 30
	li = [6, 10, 14]
	if diff in [6, 10, 14]:
		li[2] += 1
		diff -= 1
	print('YES')
	print(' '.join([str(i) for i in li]) + f' {diff}')
for i in range(int(input())):
	solution()


for _ in range(int(input())):
	n = int(input())
	se = {6, 10, 14}
	se.add(n - (6 + 10 + 14))
	if n < 31:
		print('NO')
	else:
		print('YES')
		if len(se) == 4:
			print('6 10 14', n - (6 + 10 + 14))
		else:
			print('6 10 15', n - (6 + 10 + 15))


from collections import Counter
from collections import OrderedDict

def SOCountR(mylist):
	return OrderedDict(sorted(Counter(mylist).items(), reverse=True))

def SOCount(mylist):
	return OrderedDict(sorted(Counter(mylist).items()))

def freq_count(mylist):
	return Counter(mylist)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
t = int(input())
for _ in range(t):
	n = int(input())
	n = n - 30
	if n < 1:
		print('NO')
	elif n == 6 or n == 10 or n == 14:
		n -= 1
		if n < 1:
			print('NO')
		else:
			print('YES')
			print('6 10 15', n)
	else:
		print('YES')
		print('6 10 14', n)


def crew_recruit(n):
	if n > 30:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			prime = [6, 10, 14, 15, 21, 22, 26, 33, 35, 55]
			for i in prime:
				for j in prime:
					for k in prime:
						if i != j and j != k and (i != k):
							if n - (i + j + k) != i and n - (i + j + k) != j and (n - (i + j + k) != k):
								print(f'{i} {j} {k} {n - (i + j + k)}')
								return
		else:
			print(f'6 10 14 {n - 30}')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	crew_recruit(n)


(T,) = map(int, input().split())
for _ in range(T):
	(N,) = map(int, input().split())
	if N > 30:
		print('YES')
		if N == 36:
			print('5 6 10 15')
		elif N == 40:
			print('6 10 15 9')
		elif N == 44:
			print('6 7 10 21')
		else:
			print(6, 10, 14, N - 30)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES\n5 6 10 15')
	elif n == 40:
		print('YES\n1 10 14 15')
	elif n == 44:
		print('YES\n5 10 14 15')
	else:
		print('YES\n6 10 14 {}'.format(str(n - 30)))


for nt in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	start = [6, 10, 14, 15]
	print('YES')
	if n - sum(start[0:-1]) in start:
		print(6, 10, 15, n - 31)
	else:
		print(*start[0:-1], n - sum(start[0:-1]))


def solve(n):
	(a, b, c, d, e) = (2 * 3, 2 * 5, 2 * 7, 3 * 5, 3 * 7)
	abc = a + b + c
	if n < 1 + abc:
		return None
	if n == a + abc:
		return [a, b, d, n - (a + b + d)]
	if n == b + abc:
		return [a, c, d, n - (a + c + d)]
	if n == c + abc:
		return [a, b, e, n - (a + b + e)]
	return [a, b, c, n - abc]

def main(istr, ostr):
	t = int(istr.readline().strip())
	for _ in range(t):
		n = int(istr.readline().strip())
		result = solve(n)
		if result:
			print('YES', file=ostr)
			print(*result, file=ostr)
		else:
			print('NO', file=ostr)
import sys
main(sys.stdin, sys.stdout)


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def Golomb(n):
	dp = [0] * (n + 1)
	dp[1] = 1
	for i in range(2, n + 1):
		dp[i] = 1 + dp[i - dp[dp[i - 1]]]
	return dp[1:]

def solve(leftAllowed, leftLast, ix, movesLeft, dp, a):
	if dp[leftAllowed][leftLast][ix] != -1:
		return dp[leftAllowed][leftLast][ix]
	if movesLeft == 0:
		return 0
	res = 0
	if leftLast == 0 and ix > 0 and (leftAllowed > 0):
		res = max(res, solve(leftAllowed - 1, 1, ix - 1, movesLeft - 1, dp, a) + a[ix - 1])
	res = max(res, solve(leftAllowed, 0, ix + 1, movesLeft - 1, dp, a) + a[ix + 1])
	dp[leftAllowed][leftLast][ix] = res
	return dp[leftAllowed][leftLast][ix]
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	if n < 31:
		print('NO')
		continue
	print('YES')
	if n == 36:
		print(5, 6, 10, 15)
	elif n == 40:
		print(6, 14, 15, 5)
	elif n == 44:
		print(6, 7, 10, 21)
	else:
		print(6, 10, 14, n - 30)


for t in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		x = n - 30
		if x != 6 and x != 10 and (x != 14):
			print(6, 10, 14, x)
		else:
			print(6, 10, 15, x - 1)


for _ in range(int(input())):
	n = int(input())
	ar = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		print('YES')
		t = n - 30
		if t in ar:
			print(6, 10, 15, t - 1)
		else:
			print(6, 10, 14, t)


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		diff = n - 30
		if diff == 6:
			print('YES')
			print(6, 15, 14, 1)
		elif diff == 10:
			print('YES')
			print(6, 15, 14, 5)
		elif diff == 14:
			print('YES')
			print(6, 10, 21, 7)
		else:
			print('YES')
			print(6, 10, 14, diff)


for _ in range(int(input())):
	n = int(input())
	m = [6, 10, 14, 15, 21, 35]
	if n <= 30:
		k = 0
	else:
		x1 = 6
		x2 = 10
		x3 = 14
		x4 = n - (x1 + x2 + x3)
		if x4 != x1 and x4 != x2 and (x4 != x3):
			k = 1
		else:
			i = 3
			while (x4 == x1 or x4 == x2 or x4 == x3 or (x4 <= 0)) and i <= 5:
				x3 = m[i]
				x4 = n - (x1 + x2 + x3)
				i = i + 1
			if i >= 5:
				break
			else:
				k = 1
	if k == 0:
		print('NO')
	else:
		print('YES')
		print(x1, x2, x3, x4)


for test in range(int(input())):
	n = int(input())
	x = 2 * 3
	y = 2 * 5
	z = 2 * 7
	a = 3 * 5
	ss = x + y + z
	if n - ss > 0:
		coun = 1
		if n - ss == x:
			print('YES')
			coun = 0
			print(5, x, y, a)
		elif n - ss == y:
			print('YES')
			coun = 0
			print(9, x, y, a)
		elif n - ss == z and n - a - y - x > 0:
			print('YES')
			print(13, a, y, x)
			coun = 0
		else:
			print('YES')
			print(n - ss, x, y, z)
	else:
		print('NO')


def main(case):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES\n6 10 15 5')
	elif n == 40:
		print('YES\n6 14 15 5')
	elif n == 44:
		print('YES\n6 10 15 13')
	else:
		print('YES\n6 10 14 ' + str(n - 30))
t = int(input())
for i in range(t):
	main(i + 1)


import sys
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
t = int(input())
for case in range(t):
	n = int(input())
	if n >= 31:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


t = int(input())
i = 0
while i < t:
	n = int(input())
	if n <= 30:
		print('NO')
	elif 6 != n - 30 and 10 != n - 30 and (14 != n - 30):
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('YES')
		print(6, 10, 15, n - 31)
	i += 1


num = int(input())
for i in range(num):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(f'{6} {10} {15} {n - 31}')
		else:
			print(f'{6} {10} {14} {n - 30}')


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print('5', end=' ')
		print('6', end=' ')
		print('10', end=' ')
		print('15')
	elif n == 40:
		print('YES')
		print('6', end=' ')
		print('10', end=' ')
		print('15', end=' ')
		print('9')
	elif n == 44:
		print('YES')
		print('6', end=' ')
		print('7', end=' ')
		print('10', end=' ')
		print('21')
	else:
		y = n - 30
		print('YES')
		print('6', end=' ')
		print('10', end=' ')
		print('14', end=' ')
		print(y)


I = input
pr = print

def main():
	for _ in range(int(I())):
		n = int(I())
		ar = [6, 10, 14]
		if n < 31:
			pr('NO')
			continue
		else:
			if n - 30 in ar:
				n -= 5
				ar[1] += 5
			pr('YES')
			pr(*ar, n - 30)
main()


for _ in range(int(input())):
	n = int(input())
	numbers = {6, 10, 14}
	if n - 6 - 10 - 14 > 0 and n - 6 - 10 - 14 not in numbers:
		print('Yes')
		print(6, 10, 14, n - 6 - 10 - 14)
	elif n - 6 - 10 - 15 > 0 and n - 6 - 10 - 15 not in numbers:
		print('Yes')
		print(6, 10, 15, n - 6 - 10 - 15)
	else:
		print('No')


t = int(input())
for test in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = [6, 10, 14, n - 30]
		if len(set(a)) == 4:
			print('YES')
			print(*a, sep=' ')
		elif n <= 31:
			print('NO')
		else:
			print('YES')
			print(6, 10, 15, n - 31)


def main():
	t = int(input())
	inputList = []
	for i in range(t):
		num = int(input())
		inputList.append(num)
	for num in inputList:
		if num >= 31:
			print('YES')
			if num == 36 or num == 44 or num == 40:
				print(6, 10, 15, num - 31)
			else:
				print(6, 10, 14, num - 30)
		else:
			print('NO')
main()


cases = int(input())
for case in range(cases):
	num = int(input())
	if num < 31:
		print('NO')
	else:
		print('YES')
		ans = [6, 10, 14]
		num -= 6 + 10 + 14
		if num == 6:
			ans[1] = 15
			ans.append(1)
		elif num == 10:
			ans[1] = 15
			ans.append(5)
		elif num == 14:
			ans[2] = 21
			ans.append(7)
		else:
			ans.append(num)
		for i in ans:
			print(i, end=' ')


t = input()
t = int(t)
while t > 0:
	p = input()
	p = int(p)
	if p < 31:
		print('NO')
	elif p == 36:
		print('YES')
		print('5 6 10 15')
	elif p == 40:
		print('YES')
		print('2 6 10 22')
	elif p == 44:
		print('YES')
		print('2 6 14 22')
	else:
		print('YES')
		print('6 10 14', p - 30)
	t -= 1


for _ in range(int(input())):
	a = int(input())
	if a < 31:
		print('No')
	elif a - 30 not in [6, 10, 14]:
		print('Yes 6 10 14', a - 30)
	else:
		print('Yes 6 10 15', a - 31)


def process(n):
	li = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35]
	for i in range(0, len(li)):
		for j in range(i + 1, len(li)):
			for k in range(j + 1, len(li)):
				d = n - li[i] - li[j] - li[k]
				if d == li[i] or d == li[j] or d == li[k]:
					pass
				elif d > 0:
					print('YES')
					print(li[i], li[j], li[k], d)
					return
	print('NO')
tests = int(input())
for i in range(tests):
	n = int(input())
	process(n)


T = int(input())
for i in range(T):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	(a, b, c) = (6, 10, 14)
	if n in [36, 40, 44]:
		(a, b, c) = (6, 10, 15)
	print('YES')
	print(a, b, c, n - (a + b + c))


import sys
inputlines = sys.stdin.readlines()
number_of_testcases = int(inputlines[0])
for i in range(number_of_testcases):
	number = int(inputlines[i + 1])
	if number <= 30:
		print('NO')
	else:
		print('YES')
		if number == 36:
			print('5 6 10 15')
		elif number == 40:
			print('6 10 15 9')
		elif number == 44:
			print('6 10 15 13')
		else:
			remaining_number = number - 30
			print('6', '10', '14', remaining_number)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		(a, b, c) = (6, 10, 14)
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 44:
			print(6, 7, 10, 21)
		elif n == 40:
			print(5, 6, 14, 15)
		else:
			print(a, b, c, n - a - b - c)


for _ in range(int(input())):
	n = int(input())
	flag = False
	A = [6, 10, 14]
	if n > 30:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(1, 10, 14, 15)
		elif n == 44:
			print(5, 10, 14, 15)
		else:
			A.append(n - 30)
			print(' '.join(map(str, A)))
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	elif n != 36 and n != 40 and (n != 44):
		print('YES')
		print(6, 10, 14, n - 30)
	elif n == 36:
		print('YES')
		print(6, 5, 10, 15)
	elif n == 40:
		print('YES')
		print(6, 21, 10, 3)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)


from sys import stdin
input = stdin.buffer.readline
a = [6, 10, 14, 15, 21, 30, 35]
for _ in range(int(input())):
	n = int(input())
	flag = 0
	for i in range(5):
		for j in range(i + 1, 5):
			for k in range(j + 1, 5):
				x = n - a[i] - a[j] - a[k]
				if x > 0 and x not in [a[i], a[j], a[k]]:
					print('YES')
					print(a[i], a[j], a[k], x)
					flag = 1
					break
			if flag:
				break
		if flag:
			break
	else:
		print('NO')


def solve(n):
	if n < 31:
		print('NO')
	else:
		arr = [6, 10, 14, n - 30]
		brr = [6, 10, 15, n - 31]
		crr = [10, 14, 15, n - 39]
		if len(set(arr)) == 4 and min(set(arr)) > 0:
			print('YES')
			print(*arr)
		elif len(set(brr)) == 4 and min(set(brr)) > 0:
			print('YES')
			print(*brr)
		elif len(set(crr)) == 4 and min(set(crr)) > 0:
			print('YES')
			print(*crr)
		else:
			print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	solve(n)


np = [6, 10, 14, 15, 21, 35]
t = int(input())
for _ in range(t):
	n = int(input())
	if n > 30:
		print('YES')
		x = [6, 10, 14]
		p = n - 30
		if p in x:
			x[2] = 15
			p -= 1
		print('{} {} {} {}'.format(x[0], x[1], x[2], p))
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	d = [6, 10, 14, 15, 21, 22]
	s = []
	if n <= 30:
		print('NO')
	else:
		x = d[0]
		y = d[1]
		if n == 36 or n == 40 or n == 44:
			z = d[3]
		else:
			z = d[2]
		f = n - (x + y + z)
		s.append(x)
		s.append(y)
		s.append(z)
		s.append(f)
		print('YES')
		print(*s)


import sys
readline = sys.stdin.buffer.readline
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))

def solve():
	n = ni()
	if n <= 6 + 10 + 14:
		print('NO')
		return
	v = n - 6 - 10 - 14
	print('YES')
	if v not in [6, 10, 14]:
		print(6, 10, 14, v)
	else:
		print(6, 10, 15, v - 1)
	return
T = ni()
for _ in range(T):
	solve()


for i in range(int(input())):
	num = int(input())
	if num <= 30:
		print('NO')
	elif num - 30 == 6:
		print('YES')
		print(5, 10, 15, 6)
	elif num - 30 == 10:
		print('YES')
		print(1, 15, 14, 10)
	elif num - 30 == 14:
		print('YES')
		print(6, 10, 15, 13)
	else:
		print('YES')
		print(6, 10, 14, num - 30)


for i in range(int(input())):
	n = int(input())
	l = [6, 10, 14]
	m = [6, 10, 15]
	if n > 30:
		if n - 30 not in l:
			print('YES')
			print(6, end=' ')
			print(10, end=' ')
			print(14, end=' ')
			print(n - 30)
		else:
			print('YES')
			for j in range(len(m)):
				print(m[j], end=' ')
			print(n - 31)
	else:
		print('NO')


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n < 31:
			print('NO')
		elif n == 36 or n == 40 or n == 44:
			print('YES')
			print(15, 6, 10, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
main()


t = int(input())
while t != 0:
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print(14, 15, 6, 1)
	elif n == 40:
		print('YES')
		print(14, 15, 6, 5)
	elif n == 44:
		print('YES')
		print(21, 10, 6, 7)
	else:
		print('YES')
		print(14, 10, 6, n - (14 + 10 + 6))
	t -= 1


t = int(input())
a = [6, 10, 14]
for _ in range(t):
	x = int(input())
	if x < 31:
		print('NO')
	else:
		print('YES')
		if x - sum(a) in a:
			print(6, 10, 15, x - sum(a) - 1)
		else:
			print(6, 10, 14, x - sum(a))


from sys import stdin
input = stdin.readline
INF = 10 ** 9 + 7
MAX = 10 ** 7 + 7
MOD = 10 ** 9 + 7
for Ti in range(int(input().strip())):
	n = int(input().strip())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 in [6, 14, 10]:
			(m1, m2) = (15, n - 31)
		else:
			(m1, m2) = (14, n - 30)
		print('6 10', m1, m2)


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		hg = n - 16
		if hg - 14 != 14 and hg - 14 != 6 and (hg - 14 != 10):
			print('14' + ' ' + '6' + ' ' + '10' + ' ' + str(hg - 14))
		else:
			bg = n - 31
			print('15' + ' ' + '6' + ' ' + '10' + ' ' + str(bg))


from sys import stdin, stdout
import math

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	if n < 31:
		print('NO')
	else:
		print('YES')
		ans = [6, 10, 14]
		if n - 30 in ans:
			ans = [6, 10, 15, n - 31]
		else:
			ans.append(n - 30)
		print(' '.join(map(str, ans)))


import sys
max_int = 1000000001
min_int = -max_int
t = int(input())
for _t in range(t):
	n = int(sys.stdin.readline())
	if n >= 31:
		print('YES')
		k = n - 30
		if k in [6, 10, 14]:
			print('6 10 15', n - 31)
		else:
			print('6 10 14', n - 30)
	else:
		print('NO')


import os
import operator
import sys
import bisect
import _operator
from _collections import defaultdict
from io import BytesIO, IOBase

def inar():
	return [int(k) for k in input().split()]

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def main():
	for _ in range(int(input())):
		n = int(input())
		take = [6, 10, 14]
		if n - (6 + 10 + 14) > 0:
			if n - (6 + 10 + 14) not in take:
				print('YES')
				print(6, 10, 14, n - (6 + 10 + 14))
			else:
				print('YES')
				print(6, 10, 15, n - (6 + 10 + 15))
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


a = int(input())
for x in range(a):
	b = int(input())
	if b <= 30:
		print('NO')
	else:
		print('Yes')
		if b - 30 == 6:
			print(6, 10, 15, b - 31)
		elif b - 30 == 10:
			print(6, 14, 15, b - 35)
		elif b - 30 == 14:
			print(6, 10, 21, b - 37)
		else:
			print(6, 10, 14, b - 30)


t = int(input())
for i in range(t):
	n = int(input())
	if n > 30:
		if n - (6 + 14 + 10) == 6 or n - (6 + 14 + 10) == 10 or n - (6 + 14 + 10) == 14:
			ans = n - (6 + 10 + 15)
			print('YES')
			print(6, 10, 15, ans)
		else:
			ans = n - (6 + 10 + 14)
			print('YES')
			print(6, 10, 14, ans)
	else:
		print('NO')


t = int(input())
for t1 in range(0, t):
	n = int(input())
	x = [6, 10, 14, 15, 21, 22]
	z = n - 16
	f = 0
	for i in range(2, 6):
		z2 = z - x[i]
		if z2 > 0 and z2 != 6 and (z2 != 10) and (z2 != x[i]):
			print('YES')
			print(6, 10, x[i], z2)
			f = 1
			break
	if f == 0:
		print('NO')


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	if n > 30:
		t = n - 30
		if t > 0 and t not in [6, 10, 14]:
			print('YES')
			print(6, 10, 14, n - 30)
			continue
		t = n - 31
		if t > 0 and t not in [6, 10, 15]:
			print('YES')
			print(6, 10, 15, t)
			continue
		t = n - 39
		if t > 0 and t not in [14, 10, 15]:
			print('YES')
			print(14, 10, 15, t)
			continue
		t = n - 35
		if t > 0 and t not in [6, 14, 15]:
			print('YES')
			print(6, 14, 15, t)
			continue
	else:
		print('NO')


for testcases in range(int(input())):
	a = int(input())
	if a <= 30:
		print('NO')
	elif a == 36:
		print('YES')
		print('6 10 15 5')
	elif a == 40:
		print('YES')
		print('6 10 15 9')
	elif a == 44:
		print('YES')
		print('6 10 15 13')
	else:
		print('YES')
		print('6 10 14', a - 30)


try:
	tst = int(input())
	for _ in range(tst):
		n = int(input())
		if n > 30:
			print('YES')
			if n == 36:
				print(6, 10, 15, 5)
			elif n == 40:
				print(6, 10, 15, 9)
			elif n == 44:
				print(6, 10, 15, 13)
			else:
				print(6, 10, 14, n - 30)
		else:
			print('NO')
except:
	pass


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n // i
	if n > 2:
		l.append(n)
	return l
for _ in range(t):
	n = int(stdin.readline())
	num = 6 + 10 + 14
	if n - num > 0:
		ans = []
		if n - num == 6:
			ans.append(6)
			ans.append(10)
			ans.append(15)
			ans.append(5)
		elif n - num == 10:
			ans.append(6)
			ans.append(10)
			ans.append(15)
			ans.append(9)
		elif n - num == 14:
			ans.append(6)
			ans.append(10)
			ans.append(15)
			ans.append(13)
		else:
			ans.append(6)
			ans.append(10)
			ans.append(14)
			ans.append(n - num)
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	A = [6, 10, 14, 15]
	if n > 30 and n != 36 and (n != 40) and (n != 44):
		print('YES')
		print(6, 10, 14, n - 6 - 10 - 14)
	elif n <= 30:
		print('NO')
	else:
		print('YES')
		print(6, 10, 15, n - 6 - 10 - 15)


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()

def test():
	nPrimes1 = [6, 10, 14]
	nPrimes2 = [6, 10, 15]
	nSum1 = sum(nPrimes1)
	nSum2 = sum(nPrimes2)
	n = int(input())
	if n <= nSum1:
		print('NO')
	elif n == 36 or n == 40 or n == 44:
		print('YES')
		print(*nPrimes2, n - nSum2)
	else:
		print('YES')
		print(*nPrimes1, n - nSum1)
t = int(input())
for _ in range(t):
	test()


t = int(input())
for rep in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n in [36, 40, 44]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


for _ in range(int(input())):
	N = int(input())
	if N > 30:
		print('YES')
		if N == 36:
			print(5, 6, 10, 15)
			continue
		if N == 40:
			print(6, 10, 22, 2)
			continue
		if N == 44:
			print(6, 7, 10, 21)
			continue
		print(6, 10, 14, N - 30)
	else:
		print('NO')


def solution(n):
	if n <= 30:
		return (False, ())
	else:
		if n in [36, 40, 44]:
			return (True, (6, 10, 15, n - 31))
		return (True, (6, 10, 14, n - 30))
for _ in range(int(input())):
	n = int(input())
	(cond, ans) = solution(n)
	if cond:
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print('6 14 15 1')
		elif n == 40:
			print('6 10 15 9')
		elif n == 44:
			print('6 10 13 15')
		else:
			print('6 10 14 ' + str(n - 30))


def solve(n):
	if n <= 30:
		print('NO')
		return
	print('YES')
	if n == 36:
		print(6, 10, 15, n - 31)
		return
	if n == 40:
		print(6, 14, 15, n - 35)
		return
	if n == 44:
		print(6, 10, 15, n - 31)
		return
	print(6, 10, 14, n - 30)
t = int(input())
for i in range(t):
	n = int(input())
	solve(n)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input()) - 30
	if n <= 0:
		print('NO')
	elif n == 6:
		print('YES\n5 6 10 15')
	elif n == 10:
		print('YES\n5 6 14 15')
	elif n == 14:
		print('YES\n6 7 10 21')
	else:
		print('YES\n6 10 14', n)


from math import *
t = int(input())
for i in range(1, t + 1):
	n = int(input())
	z = n - 30
	if n > 30:
		if z == 6:
			print('YES')
			print(6, 10, 15, n - 31)
		elif z == 10:
			print('YES')
			print(6, 14, 15, n - 35)
		elif z == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
for _ in range(n):
	m = inp()
	if m < 31:
		print('NO')
	else:
		ans = []
		t = m - 30
		if t == 6 or t == 10 or t == 14:
			ans.append(6)
			ans.append(10)
			ans.append(15)
			ans.append(t - 1)
		else:
			ans.append(6)
			ans.append(10)
			ans.append(14)
			ans.append(m - 30)
		res = ' '
		for x in ans:
			res += str(x) + ' '
		print('YES')
		print(res)


import sys
import os

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
	x

def take_input():
	if os.environ.get('check'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
take_input()
for _ in range(int(input())):
	n = int(input())
	if n >= 31 and n - 30 not in [6, 10, 14]:
		print('YES')
		print(*[6, 10, 14, n - 30])
	elif n >= 32 and n - 31 not in [6, 10, 15]:
		print('YES')
		print(*[6, 10, 15, n - 31])
	else:
		print('NO')


for ii in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 10 15 9')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		las = n - 30
		print('6 10 14', las)


import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def inc(d, c):
	d[c] = d[c] + 1 if c in d else 1

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for xx in input().split()]

def fi():
	return int(input())

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')

def ck(x, y):
	return int(bin(x)[2:] + bin(y)[2:], 2)
t = fi()
while t > 0:
	t -= 1
	n = fi()
	p = 6 + 10 + 14
	if n <= p:
		print('NO')
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(6, 10, 22, 2)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	else:
		print('YES')
		print(6, 10, 14, n - p)


import math
t = int(input())
ans = []

def solve(n):
	if n <= 30:
		return ['NO']
	else:
		if len({6, 10, 14, n - 30}) < 4:
			return [6, 10, 15, n - 31]
		return [6, 10, 14, n - 30]
for i in range(t):
	n = int(input())
	ans.append(solve(n))
for test in ans:
	if len(test) == 1:
		print(test[0])
	else:
		print('YES')
		print(test[0], test[1], test[2], test[3])


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		l = [6, 10, 14]
		x = n - 30
		if x not in l:
			print('YES')
			print(6, 10, 14, n - 30)
		else:
			print('YES')
			print(6, 10, 15, n - 31)


for _ in range(int(input())):
	n = int(input())
	a = 6
	b = 10
	c = 14
	s = 30
	if n - s == 6 or n - s == 14 or n - s == 10:
		c = 15
		s += 1
	if n <= s:
		print('NO')
	else:
		print('YES')
		print(a, b, c, n - s)


def c(n):
	if n <= 30:
		print('NO')
		return
	else:
		y = n - 30
		print('YES')
		l = [6, 10, 14]
		if y in l:
			print('6 10 15', end=' ')
			print(n - 31)
			return
		else:
			print('6 10 14', end=' ')
			print(y)
			return
		print(y)
		return
for _ in range(int(input())):
	n = int(input())
	c(n)


for i in range(int(input())):
	n = int(input())
	if n >= 31:
		print('YES')
		if n == 36:
			print('5 6 10 15')
		elif n == 40:
			print('6 10 15 9')
		elif n == 44:
			print('6 7 10 21')
		else:
			diff = n - 30
			print('6 10 14 ' + str(diff))
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import heapq
from collections import Counter
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		ls = [6, 10, 14]
		var = n - 30
		if var not in ls:
			print(*ls, end=' ')
			print(var)
		elif var == 6:
			print(5, 6, 10, 15)
		elif var == 14:
			print(6, 7, 10, 21)
		elif var == 10:
			print(6, 10, 15, 9)


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print(6, 10, 15, n - 31)
	elif n == 40:
		print('YES')
		print(6, 10, 15, n - 31)
	elif n == 44:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


a = int(input(''))
for i in range(0, a):
	i = int(input(''))
	g = i - 31
	h = i - 30
	if i <= 30:
		print('NO')
	elif i == 36 or i == 40 or i == 44:
		print('YES')
		print(f'6 10 15 {g}')
	else:
		print('YES')
		print(f'6 10 14 {h}')


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		prime = [6, 14, 10]
		other = n - 30
		if other == 6 or other == 14 or other == 10:
			prime[1] = 15
			other -= 1
		prime.append(other)
		print(' '.join(map(str, prime)))


t = int(input())
w = []
for i in range(t):
	n = int(input())
	if n < 31:
		w.append('NO')
	elif n == 36:
		w.append('YES')
		w.append([6, 10, 15, 5])
	elif n == 40:
		w.append('YES')
		w.append([6, 10, 15, 9])
	elif n == 44:
		w.append('YES')
		w.append([6, 10, 15, 13])
	else:
		w.append('YES')
		w.append([6, 10, 14, n - 30])
for i in w:
	if type(i) == str:
		print(i)
	else:
		ll = ' '.join([str(elem) for elem in i])
		print(ll)


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
import math
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
for _ in range(int(input())):
	n = inp(1)
	if n < 31:
		print('NO')
	else:
		if n in [36, 40, 44]:
			ans = [6, 10, 15, n - 31]
		else:
			ans = [6, 10, 14, n - 30]
		print('YES')
		print(*ans)


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def isSubsetSum(arr, n, summ):
	subarr = [[False for i in range(summ + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subarr[i][0] = True
	for i in range(1, summ + 1):
		subarr[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, summ + 1):
			if j < arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j]
			if j >= arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j] or subarr[i - 1][j - arr[i - 1]]
	return subarr[n][summ]

def bfs(v, adj, onpath):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

@bootstrap
def dfs(v, adj, vis, dp):
	dp[v][0] = 0
	dp[v][1] = 1
	for u in adj[v]:
		if vis[u]:
			continue
		vis[u] = True
		yield dfs(u, adj, vis, dp)
		dp[v][0] += max(dp[u][1], dp[u][0])
		dp[v][1] += dp[u][0]
	yield

def solution(n):
	options = [6, 10, 14, 15]
	if n > 30:
		if n - 30 in [6, 10, 14]:
			return 'Yes\n' + f'6 10 15 {n - 31}'
		return 'Yes\n' + f'6 10 14 {n - 30}'
	return 'No'

def main():
	T = 1
	T = ri()
	for i in range(T):
		n = ri()
		x = solution(n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	if n < 31:
		boo = False
	else:
		boo = True
		ans = [6, 10, 14, n - 30]
		if ans[-1] == 6:
			ans[-1] = 5
			ans[2] = 15
		elif ans[-1] == 10:
			ans[-1] = 9
			ans[2] = 15
		elif ans[-1] == 14:
			ans[-1] = 13
			ans[2] = 15
		elif ans[-1] == 15:
			ans[-1] = 7
			ans[2] = 22
	if boo:
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	minn = 2 * 3 + 2 * 7 + 2 * 5
	if n <= minn:
		print('NO')
	elif n in (36, 40, 44):
		print('YES')
		print(n - 31, 6, 10, 15)
	else:
		print('YES')
		print(n - minn, 2 * 3, 2 * 7, 2 * 5)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	n = Int()
	ans = [6, 10, 14]
	if n <= sum(ans):
		print('NO')
	else:
		if n - sum(ans) in ans:
			ans[2] = 15
		if n <= sum(ans):
			print('NO')
		else:
			print('YES')
			print(*ans, n - sum(ans))


n = int(input())
for item in range(n):
	t = int(input())
	if t < 31:
		print('NO')
	elif t - 30 != 6 and t - 30 != 10 and (t - 30 != 14):
		print('YES')
		print(str(6) + ' ' + str(10) + ' ' + str(14) + ' ' + str(t - 30))
	else:
		print('YES')
		print(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(t - 31))


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	n = int(input())
	if n < 31:
		print('NO')
	elif n - 30 == 6:
		print('YES')
		print(5, 6, 10, 15)
	elif n - 30 == 10:
		print('YES')
		print(10, 14, 15, 1)
	elif n - 30 == 14:
		print('YES')
		print(10, 14, 15, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input())
	mini = [2 * 3, 2 * 5, 2 * 7]
	if n <= sum(mini):
		print('NO')
	else:
		rem = n - sum(mini)
		if rem in mini:
			mini.pop()
			mini.append(15)
			mini.append(rem - 1)
		else:
			mini.append(rem)
		print('YES')
		print(*mini)


test = int(input())

def solve():
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)
for x in range(test):
	solve()


a = [6, 10, 14]
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	n -= 30
	print('YES')
	if n == 6 or n == 10 or n == 14:
		print(6, 10, 15, n - 1)
	else:
		print(6, 10, 14, n)


for i in [0] * int(input()):
	a = int(input())
	if a >= 31:
		print('YES')
		if a - 30 == 6:
			print(6, 10, 15, a - 31)
		elif a - 30 == 10:
			print(6, 10, 15, a - 31)
		elif a - 30 == 14:
			print(6, 10, 15, a - 31)
		else:
			print(6, 10, 14, a - 30)
	else:
		print('NO')


nearly_prime = [6, 10, 14, 15, 21]
sum_ = 6 + 10 + 14
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= sum_:
		print('NO')
	else:
		for bit_state in range(1 << 5):
			cnt = 0
			tmp = []
			for i in range(5):
				if 1 << i & bit_state:
					cnt += 1
					tmp.append(nearly_prime[i])
			if cnt == 3:
				s = sum(tmp)
				if n - s > 0 and n - s not in tmp:
					print('YES')
					print(*tmp, n - s)
					break


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math as m
for _ in range(ri()):
	n = ri()
	if n > 30:
		ws('YES')
		if n - 30 == 14 or n - 30 == 10 or n - 30 == 6:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		ws('NO')


def ans(n):
	if n <= 30:
		print('NO')
		return
	print('YES')
	if n != 36 and n != 40 and (n != 44):
		print(str(6) + ' ' + str(10) + ' ' + str(14) + ' ' + str(n - 30))
	elif n == 36:
		print(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(5))
	elif n == 40:
		print(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(9))
	elif n == 44:
		print(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(13))
	return
m = int(input())
for i in range(m):
	n = int(input())
	ans(n)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	print('YES')
	d = n - 30
	if d == 6:
		print(6, 10, 15, 5)
	elif d == 10:
		print(6, 10, 15, 9)
	elif d == 14:
		print(6, 10, 15, 13)
	else:
		print(14, 10, 6, d)


t = int(input())
for i in range(t):
	n = int(input())
	a = 14
	b = 10
	c = 6
	d = 0
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 == 14:
			a = 21
			d = 7
		elif n - 30 == 10:
			d = 5
			b = 15
		elif n - 30 == 6:
			b = 15
			d = 1
		else:
			d = n - 30
		print(a, b, c, d)


for _ in range(int(input())):
	n = int(input())
	A = [6, 10, 14, 15, 21]
	fr = 0
	for i in range(5):
		for j in range(5):
			for k in range(5):
				if i == j or j == k or i == k:
					continue
				sum = A[i] + A[j] + A[k]
				if n - sum <= 0:
					continue
				if n - sum != A[i] and n - sum != A[j] and (n - sum != A[k]):
					print('YES')
					print(A[i], A[j], A[k], n - sum)
					fr = 1
					break
			if fr == 1:
				break
		if fr == 1:
			break
	if fr != 1:
		print('NO')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		if N < 2 * 3 + 2 * 5 + 2 * 7 + 1:
			print('NO')
		else:
			x = N - (2 * 3 + 2 * 5 + 2 * 7)
			if x in (6, 10, 14):
				x = N - (2 * 3 + 2 * 5 + 3 * 5)
				if x <= 0:
					print('NO')
				else:
					print('YES')
					print(6, 10, 15, x)
			else:
				print('YES')
				print(6, 10, 14, x)
main()


for Pythonic__Python in range(int(input())):
	n = int(input())
	if n >= 31:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


def nf(nn):
	global fact
	sim = True
	for k in fact:
		if nn % k == 0:
			sim = False
			break
	if sim:
		fact.append(nn)

def rez(nn):
	global df
	k = [6, 10, 14]
	j = 3
	while nn - sum(k) > 0 and nn - sum(k) in k:
		k[2] = df[j]
		j += 1
	k4 = nn - sum(k)
	r = ''
	if k4 > 0:
		k.append(k4)
		for n in k:
			r += str(n) + ' '
	return r
fact = [2, 3, 5, 7]
for i in range(2, 7):
	nf(i * 6 - 1)
	nf(i * 6 + 1)
df = []
km = len(fact)
for i in range(km - 1):
	for j in range(i + 1, km):
		df.append(fact[i] * fact[j])
df.sort()
for i in range(int(input())):
	x = int(input())
	if x < 31:
		print('NO')
	else:
		print('YES')
		print(rez(x))


t = int(input())
s = [6, 10, 14]
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 in s:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


mi = 30
li = [6, 10, 14]
for i in range(int(input())):
	n = int(input())
	if n > mi:
		print('YES')
		last = n - mi
		if last in li:
			print(6, 10, 15, last - 1)
			continue
		print(6, 10, 14, last)
	else:
		print('NO')


from sys import stdin
n = int(stdin.readline().strip())
for i in range(n):
	x = int(stdin.readline().strip())
	ans = [6, 10, 14]
	ans1 = [6, 10, 15]
	sm = sum(ans)
	sm1 = sm + 1
	if x > sm and x - sm not in ans:
		print('YES')
		ans.append(x - sm)
		print(*ans)
	elif x > sm1 and x - sm1 not in ans1:
		print('YES')
		ans1.append(x - sm1)
		print(*ans1)
	else:
		print('NO')


test = int(input())
for _ in range(test):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		s = (14, 15, 21, 22)
		print('Yes')
		print(6, end=' ')
		print(10, end=' ')
		n -= 16
		if n - 14 == 14 or n - 14 == 10 or n - 14 == 6:
			print(15, end=' ')
			print(n - 15)
		else:
			print(14, end=' ')
			print(n - 14)


import heapq
import collections
from math import log2
import itertools
from functools import lru_cache
from sys import setrecursionlimit as srl
srl(2 * 10 ** 6)
N = 200001

def solve(n):
	if n <= 30:
		return ['NO']
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			return [6, 10, 15, n - 31]
		else:
			return [6, 10, 14, n - 30]
t = int(input())
while t:
	n = int(input())
	print(*solve(n))
	t -= 1


t = int(input())
n_arr = [int(input()) for i in range(t)]
np = [6, 10, 14, 15, 21, 22]
for n in n_arr:
	if n > 30:
		print('YES')
		if n == 36:
			print('6 10 15 5')
		elif n == 40:
			print('6 14 15 5')
		elif n == 44:
			print('6 10 15 13')
		else:
			print(f'6 10 14 {n - 30}')
	else:
		print('NO')


t = int(input())
myList = []
for _ in range(t):
	n = int(input())
	if n != 36 and n != 40 and (n != 44):
		if n > 30:
			myList.append([6, 10, 14, n - 30])
		else:
			myList.append(['NO'])
	elif n == 36:
		myList.append([6, 10, 15, 5])
	elif n == 40:
		myList.append([6, 10, 15, 9])
	elif n == 44:
		myList.append([6, 10, 15, 13])
for elem in myList:
	if len(elem) > 1:
		print('YES')
		print(*elem)
	else:
		print(*elem)


n = int(input())
for o in range(n):
	a = int(input())
	if a <= 30:
		print('NO')
	else:
		print('YES')
		m = [6, 10, 14]
		ans = a - 30
		for i in range(3):
			if a - 30 == m[i]:
				m[2] += 1
				ans = a - 30 - 1
		for i in range(3):
			print(m[i], end=' ')
		print(ans)


tcs = int(input())
for tc in range(tcs):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		tmp = n - 30
		if tmp != 6 and tmp != 10 and (tmp != 14):
			print('6 10 14 ' + str(tmp))
		else:
			print('6 10 15 ' + str(tmp - 1))


from sys import stdin, stdout
import math
from collections import defaultdict

def print(o):
	return stdout.write(str(o) + '\n')
for _ in range(int(input())):
	n = int(input())
	if n == 36:
		print('YES')
		print('15 10 6 5')
	elif n == 40:
		print('YES')
		print('15 10 6 9')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	elif n > 30:
		print('YES')
		print('14 10 6 ' + str(n - 30))
	else:
		print('NO')


def nepr(n):
	l = []
	i = 2
	x = n
	while n > 1:
		if n % i == 0:
			n = n // i
			l.append(i)
		else:
			i += 1
	if len(l) == 2 and l[0] != l[1]:
		return x
	return -1
for _ in range(int(input())):
	j = 2
	n = int(input())
	np = []
	for i in range(4, n):
		k = nepr(i)
		if k > 0:
			np.append(k)
		if len(np) >= j + 1:
			l = [np[0], np[1], np[j]]
			x = n - np[0] - np[1] - np[j]
			j += 1
			if x not in l and x > 0:
				break
	if len(np) < 3:
		print('NO')
	elif x <= 0 or x in l:
		print('NO')
	else:
		print('YES')
		print(str(l[0]) + ' ' + str(l[1]) + ' ' + str(l[2]) + ' ' + str(x))


for _ in range(int(input())):
	n = int(input())
	a = [6, 10, 14]
	s = [6, 10, 15]
	if n <= 30:
		print('NO')
	elif n > 44:
		print('YES')
		print('6', '10', '14', n - 30)
	else:
		t = n - 30
		if t == 14:
			if n - 31 not in s:
				print('YES')
				print('6', '10', '15', n - 31)
			else:
				print('NO')
		elif t == 10:
			print('YES')
			print('6', '14', '15', '5')
		elif t == 6:
			print('YES')
			print('6', '10', '15', '5')
		else:
			print('YES')
			print('6', '10', '14', t)


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(k):
	console('----- solving ------')
	if k == 36:
		print('YES')
		print('6 10 15 5')
		return
	if k == 40:
		print('YES')
		print('6 10 15 9')
		return
	if k == 44:
		print('YES')
		print('6 7 10 21')
		return
	if k > 30:
		print('YES')
		print('6 10 14 {}'.format(k - 6 - 10 - 14))
		return
	else:
		print('NO')
	return

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	k = int(input())
	solve(k)


tests = int(input())
k = [6, 10, 14, 15, 21, 35]
for _ in range(tests):
	m = int(input())
	if m < 31:
		print('NO')
	else:
		print('YES')
		print(6, 10, end=' ')
		x = m - 16 - 14
		if x in [6, 10, 14]:
			print(15, x - 1)
		else:
			print(14, x)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [6, 10, 14]
	s = sum(a)
	d = n - s
	if n <= s:
		print('NO')
	else:
		tf = 1
		if d not in a:
			a.append(d)
		elif n == 36:
			a = [5, 6, 10, 15]
		elif n == 40:
			a = [6, 14, 15, 5]
		elif n == 44:
			a = [6, 10, 15, 13]
		if tf == 0:
			print('NO')
		else:
			print('YES')
			for i in a:
				print(i, end=' ')
			print('')


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 31:
		print('YES')
		print(6, 10, 14, 1)
	elif n == 37:
		print('YES')
		print(6, 10, 14, 7)
	elif n == 41:
		print('YES')
		print(6, 10, 14, 11)
	elif n == 46:
		print('YES')
		print(6, 10, 14, 16)
	elif n >= 32:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('NO')


t = int(input())
dict = {}
for i in range(t):
	n = int(input())
	dict[i] = n
n1 = 6
n2 = 10
n3 = 14
nn1 = 15
for key in dict.keys():
	if dict[key] < 31:
		print('NO')
	else:
		print('YES')
		if dict[key] - 30 == 6 or dict[key] - 30 == 10 or dict[key] - 30 == 14:
			print(n1, n2, nn1, dict[key] - n1 - n2 - nn1)
		else:
			print(n1, n2, n3, dict[key] - n1 - n2 - n3)


a = input()
for x in range(int(a)):
	list1 = [6, 10, 14, 15, 21, 22, 35, 55, 77]
	b = input()
	if int(b) <= 30:
		print('NO')
	else:
		tag = 0
		for i in range(len(list1) - 3):
			ans = [list1[i]]
			for j in range(i + 1, len(list1) - 2):
				ans = [list1[i], list1[j]]
				for k in range(j + 1, len(list1) - 1):
					ans = [list1[i], list1[j], list1[k]]
					if int(b) - (list1[i] + list1[j] + list1[k]) >= 1 and int(b) - (list1[i] + list1[j] + list1[k]) not in ans:
						tag = 1
						break
				if tag == 1:
					break
			if tag == 1:
				break
		if tag == 0:
			print('NO')
		else:
			print('YES')
			for i in ans:
				print(i, end=' ')
			print(int(b) - sum(ans))


T = int(input())
for i in range(T):
	n = int(input())
	if n - 30 > 0:
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print('YES')
			print('6 10 15', end=' ')
			print(n - 31)
		else:
			print('YES')
			print('6 10 14', end=' ')
			print(n - 30)
	else:
		print('NO')


def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		if N <= 30:
			print('NO')
		elif N in [36, 40, 44]:
			print('YES')
			print(6, 10, 15, N - 31)
		else:
			print('YES')
			print(6, 10, 14, N - 30)
main()


for _ in range(int(input())):
	n = int(input())
	if n > 30:
		n1 = n - 30
		print('YES')
		if n1 not in [6, 10, 14]:
			print(6, 10, 14, n1)
		else:
			print(6, 10, 15, n1 - 1)
	else:
		print('NO')


import re
t = int(input())
for _ in range(t):
	n = int(input())
	k = 2 * 3 + 2 * 5 + 2 * 7
	if n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('Yes')
		print(6, 10, 15, 9)
	elif n == 44:
		print('Yes')
		print(6, 10, 15, 13)
	elif n - k > 0:
		print('Yes')
		print(6, 10, 14, n - k)
	else:
		print('No')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	if n > 30:
		(a, b, c) = (6, 10, 14)
		diff = n - 30
		if diff == a or diff == b or diff == c:
			diff -= 1
			c += 1
		print('YES')
		print('{} {} {} {}'.format(a, b, c, diff))
	else:
		print('NO')


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 9 10 15')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		temp = n - 30
		if temp < 6:
			print('YES')
			print(temp, end=' ')
			print('6 10 14')
		elif temp < 10:
			print('YES')
			print('6', end=' ')
			print(temp, end=' ')
			print('10 14')
		elif temp < 14:
			print('YES')
			print('6 10', end=' ')
			print(temp, end=' ')
			print('14')
		else:
			print('YES')
			print('6 10 14', end=' ')
			print(temp)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n == 6 + 10 + 14 + 6:
			print('YES')
			print(6, 10, 15, 5)
		elif n == 6 + 10 + 14 + 10:
			print('YES')
			print(6, 14, 15, 5)
		elif n == 6 + 10 + 14 + 14:
			print('YES')
			print(6, 10, 15, 13)
		elif n > 6 + 10 + 14:
			print('YES')
			print(6, 10, 14, n - (6 + 10 + 14))
		else:
			print('NO')
main()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
nearly_primes = {6, 10, 14}
for case in range(1, itg() + 1):
	n = itg()
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 in nearly_primes:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


x = int(input())
result = []
for i in range(x):
	n = int(input())
	lst = [2 * 3, 2 * 5, 2 * 7]
	lst.append(n - sum(lst))
	if lst[3] <= 0:
		result.append('NO')
	elif lst[3] in lst[:3]:
		temp = lst[3]
		result.append('YES')
		result.append([2 * 3, 2 * 5, 3 * 5, temp - 1])
	else:
		result.append('YES')
		result.append(lst)
for i in result:
	if i == 'YES' or i == 'NO':
		print(i)
	else:
		print(i[0], i[1], i[2], i[3])


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
sys.setrecursionlimit(10 ** 6)
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
prime = [6, 10, 14, 21, 33, 55, 15]
t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	for i in prime:
		for j in prime:
			for k in prime:
				if i != j and j != k and (i != k):
					if n - (i + j + k) > 0 and n - (i + j + k) != i and (n - (i + j + k) != j) and (n - (i + j + k) != k):
						ans = [i, j, k, n - (i + j + k)]
	if ans:
		print('YES')
		print(*ans)
	else:
		print('NO')


from collections import deque
from math import *
import heapq
from random import *
import sys
t = int(input())
for i in range(t):
	ll = [6, 10, 14, 15, 21, 22, 33, 35]
	BALLE = [6, 10, 14]
	val = 2 * 3 + 2 * 5 + 2 * 7
	n = int(input())
	if n > val:
		if n - val in BALLE:
			c = BALLE.pop(-1)
			ll.remove(c)
			for j in range(len(ll)):
				if ll[j] not in BALLE:
					break
			if ll[j] + sum(BALLE) < n:
				print('YES')
				print(BALLE[0], BALLE[1], ll[j], n - (ll[j] + sum(BALLE)))
			else:
				print('NO')
		else:
			print('YES')
			print(2 * 3, 2 * 5, 2 * 7, n - val)
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES\n{} {} {} {}'.format(6, 10, 15, n - 6 - 10 - 15)) if n == 36 or n == 40 or n == 44 else print('YES\n{} {} {} {}'.format(6, 10, 14, n - 6 - 10 - 14))


t = int(input())
for tt in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		k = n - 30
		l = k - 1
		l = str(l)
		k = str(k)
		x = ['6', '10', '14', k]
		y = ['6', '10', '15', l]
		if k == '6' or k == '10' or k == '14':
			print(' '.join(y))
		else:
			print(' '.join(x))


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def solve():
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)
t = int(input())
for i in range(t):
	n = int(input())
	eval = (True, False)[n < 31]
	if eval:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print('6 10 15 ' + str(n - 31))
		else:
			print('6 10 14 ' + str(n - 30))
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		d = n - 30
		if d in l:
			l = [6, 10, 15]
			d = n - 31
			l.append(d)
			print('YES')
			print(*l)
		else:
			print('YES')
			l.append(d)
			print(*l)


for _ in range(int(input())):
	n = int(input())
	for t in ((6, 10, 14), (6, 10, 15)):
		s = sum(t)
		if n > s and n - s not in t:
			print('YES')
			print(n - s, *t)
			break
	else:
		print('NO')


from sys import *
input = stdin.readline
t = int(input())
p = []
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(6, 14, 15, 5)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


test = int(input())
for i in range(test):
	n = int(input())
	n = n - 6 - 10 - 14
	if n <= 0:
		print('NO')
	else:
		print('YES')
		if n == 6:
			print('1 6 14 15')
		elif n == 10:
			print('6 15 14 5')
		elif n == 14:
			print('6 22 15 1')
		else:
			print('6 10 14 ' + str(n))


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return False
for _ in range(int(input())):
	n = getN()
	primes = [6, 10, 14, 15]
	if n - primes[0] - primes[1] - primes[2] > 0:
		if n - primes[0] - primes[1] - primes[2] in primes[:3]:
			if n - primes[0] - primes[1] - primes[3] > 0:
				print('YES')
				print(primes[0], primes[1], primes[3], n - primes[0] - primes[1] - primes[3])
			else:
				print('NO')
		else:
			print('YES')
			print(6, 10, 14, n - 2 * 3 - 2 * 7 - 2 * 5)
	else:
		print('NO')


from math import *
a = [6, 10, 14]
l = [15, 21, 22, 33, 35]
for _ in range(int(input())):
	n = int(input())
	if n > 30:
		x = n - 30
		if x not in a:
			print('YES')
			print(6, 10, 14, x)
		else:
			y = x + 14
			f = 0
			for i in l:
				if y > i:
					f = 1
					break
			if f:
				print('YES')
				print(i, y - i, end=' ')
				for i in a:
					if i != 14:
						print(i, end=' ')
				print()
			else:
				print('NO')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def main(a):
	if a <= 30:
		return 'NO'
	elif a - 30 in [6, 10, 14]:
		print('YES')
		return '6 10 15' + ' ' + str(a - 31)
	else:
		print('YES')
		return '6 10 14' + ' ' + str(a - 30)
for _ in range(int(input())):
	a = int(input())
	print(main(a))


t = int(input())
for i in range(t):
	n = int(input())
	if n == 36:
		print('yes')
		print(5, 6, 10, 15)
		continue
	elif n == 44:
		print('yes')
		print(6, 7, 10, 21)
		continue
	elif n == 40:
		print('yes')
		print(6, 3, 21, 10)
		continue
	if n <= 30:
		print('NO')
	else:
		print('yes')
		print(6, 10, 14, n - 30)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print('5 6 10 15')
		if n == 40:
			print('15 14 10 1')
		if n == 44:
			print('6 7 10 21')
		if n != 36 and n != 40 and (n != 44):
			print('6 10 14 ' + str(n - 30))


t = int(input())
l = [6, 10, 14, 15, 21]
for _ in range(t):
	n = int(input())
	if n >= 31:
		x = n - 6 - 10 - 14
		if x not in [6, 10, 14]:
			print('YES')
			print(6, 10, 14, x)
		elif x == 6:
			x = n - 10 - 6 - 15
			if x > 0:
				print('YES')
				print(10, 6, 15, x)
			else:
				print('NO')
		elif x == 10:
			x = n - 6 - 10 - 15
			if x > 0:
				print('YES')
				print(6, 10, 15, x)
			else:
				print('NO')
		elif x == 14:
			x = n - 10 - 6 - 15
			if x > 0:
				print('YES')
				print(10, 6, 15, x)
			else:
				print('NO')
	else:
		print('NO')


def createSemiPrimeSieve(n):
	v = [0 for i in range(n + 1)]
	for i in range(1, n + 1):
		v[i] = i
	countDivision = [0 for i in range(n + 1)]
	for i in range(n + 1):
		countDivision[i] = 2
	for i in range(2, n + 1, 1):
		if v[i] == i and countDivision[i] == 2:
			for j in range(2 * i, n + 1, i):
				if countDivision[j] > 0:
					v[j] = int(v[j] / i)
					countDivision[j] -= 1
	res = []
	for i in range(2, n + 1, 1):
		if v[i] == 1 and countDivision[i] == 0:
			res.append(i)
	return res
semiPrime = createSemiPrimeSieve(10000)
for _ in range(int(input())):
	n = int(input())
	ans = []
	if n < 31:
		print('NO')
	else:
		i = 0
		count = 0
		sum = 0
		while count < 3:
			if abs(n - (sum + semiPrime[i])) not in ans:
				ans.append(semiPrime[i])
				sum += semiPrime[i]
				count += 1
			i += 1
		if n - sum in ans:
			sum -= ans[-1]
			ans[-1] = semiPrime[i + 1]
			sum += semiPrime[i + 1]
			ans.append(n - sum)
		else:
			ans.append(abs(n - sum))
		ans.sort()
		print('YES')
		print(*ans)


for _ in range(int(input())):
	n = int(input())
	s = [6, 10, 14]
	if n >= 31:
		print('YES')
		s.append(n - 30)
		if len(set(s)) == 3:
			s = [6, 10, 15, n - 31]
		else:
			s = [6, 10, 14, n - 30]
		print(*s)
	else:
		print('NO')


def solve(n):
	arr1 = [6, 10, 14]
	arr2 = [6, 10, 15]
	if n <= 30:
		print('No')
	else:
		diff = n - 30
		c = arr1.count(diff)
		print('Yes')
		if c > 0:
			print(*arr2, n - 31)
		else:
			print(*arr1, n - 30)
test_case = int(input())
while test_case != 0:
	n = int(input())
	solve(n)
	test_case = test_case - 1


import sys
input = sys.stdin.readline

def name(n):
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES', 5, 6, 10, 15)
	elif n == 40:
		print('YES', 5, 6, 14, 15)
	elif n == 44:
		print('YES', 6, 7, 10, 21)
	else:
		print('YES', 6, 10, 14, n - 30)

def solution():
	n = int(input())
	name(n)
t = int(input())
for i in range(0, t):
	solution()


import sys
import math
mod = 10 ** 9 + 7
inf = float('inf')

def I():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))
t = I()
for _ in range(t):
	n = I()
	x = [2 * 3, 2 * 5, 2 * 7, 3 * 5, 3 * 7, 2 * 11]
	s = sum(x[:3])
	f = False
	for i in range(6):
		if f:
			continue
		for j in range(i + 1, 6):
			if f:
				continue
			for k in range(j + 1, 6):
				if f:
					continue
				y = [x[i], x[j], x[k]]
				if n > sum(y):
					if n - sum(y) in y:
						continue
					print('YES')
					print(*y, n - sum(y))
					f = True
					break
	if not f:
		print('NO')


t = int(input())
r = [6, 10, 14, 15, 21, 22]
for i in range(t):
	b = int(input())
	if b > 30:
		print('YES')
		if b == 36:
			print('6 10 15 5')
		elif b == 40:
			print('6 10 15 9')
		elif b == 44:
			print('6 7 10 21')
		else:
			print('6 10 14 ' + str(b - 30))
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		print('YES')
		if n != 36 and n != 40 and (n != 44):
			print(6, 10, 14, n - 30)
		else:
			if n == 36:
				print(5, 6, 10, 15)
			if n == 40:
				print(5, 6, 15, 14)
			if n == 44:
				print(9, 6, 15, 14)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 31:
		p = 2 * 3
		q = 2 * 5
		r = 2 * 7
		s = n - p - q - r
		print('YES')
		print(p, q, r, s)
	else:
		p = 2 * 3
		q = 2 * 5
		r = 2 * 7
		z = 15
		s = n - p - q - r
		sy = set()
		sy.add(p)
		sy.add(q)
		sy.add(r)
		sy.add(s)
		if len(sy) < 4:
			r = 15
			s1 = set()
			s1.add(p)
			s1.add(q)
			s1.add(r)
			s1.add(n - p - q - r)
			if len(s1) < 4:
				print('NO')
			else:
				print('YES')
				print(p, q, r, n - p - q - r)
		else:
			print('YES')
			print(q, s, r, p)


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def to_zero(n, s):
	lst = s[0]
	ans = []
	for i in range(n):
		if lst == s[i]:
			continue
		elif lst == '0':
			lst = '1'
			ans.append(i)
		else:
			lst = '0'
			ans.append(i)
	if lst == '1':
		ans.append(n)
	return ans
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(15, 14, 6, 1)
		elif n == 40:
			print(21, 10, 6, 3)
		elif n == 44:
			print(21, 14, 6, 3)
		else:
			print(6, 10, 14, n - 6 - 10 - 14)


import sys
import collections

def input():
	return sys.stdin.readline().rstrip()

def split_input():
	return [int(i) for i in input().split()]
tests = int(input())
for _ in range(tests):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 not in (6, 10, 14):
			print('%d %d %d %d' % (6, 10, 14, n - 30))
		else:
			print('%d %d %d %d' % (6, 10, 15, n - 31))


from itertools import combinations
from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		if N < 31:
			print('NO')
			continue
		n = [6, 10, 14, 15, 21, 22, 26, 33]
		for (n1, n2, n3) in combinations(n, 3):
			n4 = N - n1 - n2 - n3
			if n4 > 0 and n4 not in n:
				print('YES')
				print(n1, n2, n3, n4)
				break
main()


def ab():
	n = int(input())
	m = 6 + 10 + 14
	if n <= m:
		print('NO')
	else:
		print('YES')
		if n == m + 6:
			print(str(6) + ' ' + str(15) + ' ' + str(14) + ' ' + str(1))
		elif n == m + 10:
			print(str(6) + ' ' + str(15) + ' ' + str(14) + ' ' + str(5))
		elif n == m + 14:
			print(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(13))
		else:
			print(str(6) + ' ' + str(10) + ' ' + str(14) + ' ' + str(n - m))
for i in range(0, int(input())):
	ab()


from math import sqrt
for _ in range(int(input())):
	n = int(input())
	a = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		n = n - 30
		if n in a:
			a.remove(14)
			a.append(15)
			print('YES')
			print(*a, n - 1)
		else:
			print('YES')
			print(*a, n)


def main():
	testcase = int(input())
	for _ in range(testcase):
		n = int(input())
		x = n - 6 - 10 - 14
		if x > 0 and x != 6 and (x != 10) and (x != 14):
			print('YES')
			print(6, 10, 14, x)
		else:
			x = n - 6 - 10 - 15
			if x > 0 and x != 6 and (x != 10) and (x != 15):
				print('YES')
				print(6, 10, 15, x)
			else:
				print('NO')
main()


for _ in range(int(input())):
	n = int(input())
	u = 2 * 3 + 2 * 5 + 2 * 7 + 1
	if n < u:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n + 1 - u)


import sys, math
from collections import Counter, deque, defaultdict
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input()
C = lambda : input().strip().split()
mod = 1000000007

def pl(a):
	print(' '.join(list(map(str, a))))

def solve():
	n = I()
	l = [6, 10, 14]
	if n > 30:
		if n - 30 in l:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')
for _ in range(I()):
	solve()


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		k = n - 14 - 10 - 6
		if k in [14, 10, 6]:
			print(15, 10, 6, k - 1)
		else:
			print(14, 10, 6, k)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
for _ in range(L()[0]):
	n = L()[0]
	if n <= 30:
		print('No')
	elif n - 30 not in [6, 10, 14]:
		print('Yes')
		print(6, 10, 14, n - 30)
	else:
		print('Yes')
		if n - 30 == 6:
			print(6, 10, 15, n - 31)
		elif n - 30 == 10:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 15, n - 31)


ls = lambda : list(map(int, input().split()))
ip = lambda : int(input())
r = lambda a: range(a)
t = ip()
for _ in r(t):
	n = ip()
	if n < 31:
		print('NO')
	else:
		last = n - 30
		if last == 6 or last == 10 or last == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)


import sys
input = sys.stdin.readline
for f in range(int(input())):
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 not in [6, 10, 14]:
			print(6, 10, 14, n - 30)
		else:
			if n - 30 == 6:
				print(5, 6, 10, 15)
			if n - 30 == 10:
				print(6, 9, 10, 15)
			if n - 30 == 14:
				print(6, 10, 13, 15)
	else:
		print('NO')


rw = int(input())
for qwe in range(rw):
	n = int(input())
	if n > 14 + 6 + 10:
		print('YES')
		if n - 30 in [14, 6, 10]:
			print(n - 31, 15, 6, 10)
			continue
		print(n - 30, 14, 6, 10)
	else:
		print('NO')


n = int(input())
for i in range(n):
	x = int(input())
	if x <= 30:
		print('NO')
	elif x - 30 == 6 or x - 30 == 10 or x - 30 == 14:
		print('YES\n6 10 15 %d' % (x - 31))
	else:
		print('YES\n6 10 14 %d' % (x - 30))


import math
import sys
import bisect
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	x1 = [6, 10, 14]
	x2 = [6, 10, 15]
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		ex1 = n - 30
		ex2 = n - 31
		if ex1 in x1:
			print(*x2[:], ex2)
		elif ex2 in x2:
			print(*x1[:], ex1)
		else:
			print(*x1[:], ex1)


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		res = n - 30
		if res in {6, 10, 14}:
			print('YES\n6 10 15 {}'.format(res - 1))
		else:
			print('YES\n6 10 14 {}'.format(res))


t = int(input())
for asda in range(t):
	n = int(input())
	if n > 30:
		if n - 30 == 6:
			print('YES')
			print('10 6 15 5')
		elif n - 30 == 10:
			print('YES')
			print('5 6 14 15')
		elif n - 30 == 14:
			print('YES')
			print('6 7 10 21')
		else:
			print('YES')
			print('6 10 14', n - 30)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = 6
	b = 10
	c = 14
	d = 15
	arr = [a, b, c]
	res = n - a - b - c
	if n < 31:
		print('NO')
	else:
		print('YES')
		if res not in arr:
			print(a, b, c, res)
		else:
			if n == 36:
				print(6, 10, 15, 5)
				continue
			if n == 40:
				print(6, 10, 15, 9)
				continue
			if res == c:
				print(a, b, d, res - 1)
				continue


from sys import stdin, stdout

def input():
	return stdin.readline().strip()

def ans(n):
	a = 2 * 3
	b = 2 * 5
	c = 2 * 7
	d = n - (a + b + c)
	if d <= 0:
		return False
	elif len(set([a, b, c, d])) == 4:
		return (a, b, c, d)
	else:
		c = 3 * 5
		d = n - (a + b + c)
		if d <= 0:
			return False
		else:
			assert len(set([a, b, c, d])) == 4
			return (a, b, c, d)
T = int(input())
for _ in range(T):
	n = int(input())
	r = ans(n)
	if not r:
		print('NO')
	else:
		print('YES')
		print(*r)


from math import sqrt
from itertools import combinations

def prime():
	primes = [2, 3]
	for i in range(4, int(sqrt(200000)) + 1):
		flag = 1
		for j in range(2, int(sqrt(i)) + 1):
			if i % j == 0:
				flag = 0
				break
		if flag:
			primes.append(i)
	return primes
p = prime()
p = list(combinations(p, 2))
prime = set()
for i in range(len(p)):
	prime.add(p[i][1] * p[i][0])
prime = sorted(list(prime))
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	j = 0
	flag = 1
	for i in range(len(prime)):
		for j in range(i + 1, len(prime)):
			for k in range(j + 1, len(prime)):
				s = prime[i] + prime[j] + prime[k]
				if n - s >= 0 and n - s not in prime:
					print('YES')
					print(prime[i], prime[j], prime[k], n - s)
					flag = 0
					break
				if s >= n:
					break
			if flag == 0:
				break
		if flag == 0:
			break
	if flag:
		print('NO')


for _ in range(int(input())):
	n = int(input().strip())
	(a, b, c) = (6, 10, 14)
	if n <= 30:
		print('NO')
	else:
		print('YES')
		d = n - 30
		if d == a or d == b or d == c:
			print(f'{a} {b} {15} {d - 1}')
		else:
			print(f'{a} {b} {c} {d}')


import math

def simpl(x):
	for i in range(2, int(math.sqrt(x))):
		if x % i == 0:
			return False
	return True
t = int(input())
a = []
for i in range(10000):
	if simpl(i):
		a.append(i)
for i in range(t):
	x = int(input())
	if x > 30 and x - 30 not in [6, 10, 14]:
		print('YES')
		print(6, 10, 14, x - 30)
	elif x > 31 and x - 31 not in [6, 10, 15]:
		print('YES')
		print(6, 10, 15, x - 31)
	else:
		print('NO')


def ques1(n):
	if n <= 30:
		print('NO')
	else:
		print('YES')
		l = []
		if n == 36 or n == 40 or n == 44:
			l = [6, 10, 15, n - 31]
		else:
			l = [6, 10, 14, n - 30]
		print(*l)
t = int(input())
for i in range(t):
	n = int(input())
	ans = ques1(n)
	ans


import sys
input = sys.stdin.readline
from itertools import combinations
vals = [6, 10, 14, 15, 21, 22, 26, 33, 35]
t = int(input())
ans = None
for i in range(t):
	n = int(input())
	ok = False
	for comb in combinations(vals, 3):
		nval = n - sum(comb)
		has_same = False
		if nval <= 0:
			continue
		for item in comb:
			if nval == item:
				has_same = True
		if not has_same:
			ok = True
			ans = [comb[0], comb[1], comb[2], nval]
		if ok:
			break
	if ok:
		print('YES')
		print(*ans)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	if n == 36:
		print('5 6 10 15')
		continue
	if n == 40:
		print('6 9 10 15')
		continue
	if n == 44:
		print('6 7 10 21')
		continue
	print('6 10 14 {0}'.format(n - 30))


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	n = get_int()
	if n < 31:
		print('NO')
	else:
		x = n - 30
		if x not in [6, 10, 14]:
			print('YES')
			print(6, 10, 14, x)
		else:
			x = n - 31
			if x > 0:
				print('YES')
				print(6, 10, 15, x)
			else:
				print('NO')

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


for _ in range(int(input())):
	n = int(input())
	x = 6 + 10 + 14
	if x + 1 > n:
		print('NO')
		continue
	y = n - x
	if y not in (6, 10, 14):
		print('YES')
		print(6, 10, 14, y)
		continue
	x += 1
	y -= 1
	if y == 0:
		print('NO')
	else:
		print('YES')
		print(6, 10, 15, y)


import sys
from math import sqrt, gcd, ceil, log
from collections import defaultdict, Counter, deque
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))

def main():
	N = 2 * 10 ** 5
	primes = [1] * N
	i = 2
	while i * i < N:
		if primes[i] == 1:
			j = i
			while i * j < N:
				primes[i * j] = 0
				j += 1
		i += 1
	prime_list = [6, 10, 14, 15, 21, 22, 33]
	for _ in range(int(input())):
		n = int(input())
		ans = []
		i = 0
		while len(ans) < 3:
			if n - prime_list[i] in ans or n - prime_list[i] == prime_list[i]:
				i += 1
				n -= prime_list[i]
				ans.append(prime_list[i])
				i += 1
			else:
				n -= prime_list[i]
				ans.append(prime_list[i])
				i += 1
		ans.append(str(n))
		if n > 0:
			print('YES')
			print(' '.join(map(str, ans)))
		else:
			print('NO')
main()


import math
t = int(input())
for g in range(t):
	n = int(input())
	A = [6, 10, 14, 15, 21]
	f = 0
	for i in range(5):
		for j in range(5):
			for k in range(5):
				if i == j or j == k or i == k:
					continue
				sum = A[i] + A[j] + A[k]
				if n - sum <= 0:
					continue
				if n - sum != A[i] and n - sum != A[j] and (n - sum != A[k]):
					print('YES')
					print(A[i], A[j], A[k], n - sum)
					f = 1
					break
			if f == 1:
				break
		if f == 1:
			break
	if f != 1:
		print('NO')


from sys import stdin, stdout, setrecursionlimit

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n + 1):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1

def findPrimePair(n):
	isPrime = [0] * (n + 1)
	SieveOfEratosthenes(n, isPrime)
	for i in range(0, n):
		if isPrime[i] and isPrime[n - i] and (i != 2):
			return (2 * i, n - i)
T = int(stdin.readline())
for _ in range(T):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		n = n - (6 + 10 + 14)
		if n == 6 or n == 10 or n == 14:
			print(6, 10, 15, n - 1)
		else:
			print(6, 10, 14, n)


a = int(input())
for i in range(a):
	x = int(input())
	if x <= 30:
		print('NO')
	elif x == 36:
		print('YES')
		print('5 6 10 15')
	elif x == 40:
		print('YES')
		print('2 6 10 22')
	elif x == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		print('6 10 14', end=' ')
		print(x - 30)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	lst1 = [6, 10, 14]
	lst2 = [6, 10, 15]
	if n - 30 in lst1:
		lst2.append(n - 31)
		lst = lst2
	else:
		lst1.append(n - 30)
		lst = lst1
	print('YES')
	for i in lst:
		print(i, end=' ')
	print()


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(6, 15, 14, 5)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	else:
		print('YES')
		print(6, 14, 10, n - 30)


for _ in range(int(input())):
	n = int(input())
	a = 2 * 3 + 2 * 5 + 2 * 7
	q = n - a
	if q == 6 or q == 10 or q == 14:
		a = 6 + 15 + 14
		q = n - a
		print('YES')
		print(6, 15, 14, q)
	elif n >= 31:
		print('YES')
		print(6, 10, 14, q)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 44:
			print(6, 7, 10, 21)
		elif n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(3, 6, 10, 21)
		else:
			arr = [6, 10, 14, n - 30]
			arr.sort()
			for i in range(len(arr)):
				print(arr[i], end=' ')
			print()


import sys
input = lambda : sys.stdin.readline().rstrip()
ans = [2 * 3, 2 * 5, 2 * 7]
s = sum(ans)
for _ in range(int(input())):
	n = int(input())
	if n > s and n - s not in ans:
		print('YES')
		print(*ans, n - s)
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(6, 10, 22, 2)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	pos = [6, 10, 14, 22, 15, 5 * 7, 7 * 3]
	flag = 0
	for i in range(len(pos)):
		for j in range(len(pos)):
			for k in range(len(pos)):
				if i == j or j == k or i == k:
					continue
				a = [pos[i], pos[j], pos[k]]
				if n - sum(a) > 0 and n - sum(a) not in a and (not flag):
					print('YES')
					print(*a, n - sum(a))
					flag = 1
	if not flag:
		print('NO')


def solve():
	n = int(input())
	if n <= 30:
		print('NO')
		return
	else:
		num = [6, 10]
		if n - 30 in num + [14]:
			print('YES')
			print('6 10 15 ' + str(n - 31))
		else:
			print('YES')
			print('6 10 14 ' + str(n - 30))
t = int(input())
for i in range(t):
	solve()


q = int(input())
for i in range(q):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print('14 15 6', n - 35)
		else:
			print('14 10 6', n - 30)


from collections import defaultdict
import bisect
import math

def solve(n):
	if n < 31:
		return (False, 0, 0, 0, 0)
	else:
		a = 6
		b = 10
		c = 14
		d = n - (6 + 10 + 14)
		if d in [a, b, c]:
			d = d - 1
			c = c + 1
		return (True, a, b, c, d)
for _ in range(int(input())):
	n = int(input())
	(boo, a, b, c, d) = solve(n)
	if boo:
		print('YES')
		print(a, b, c, d)
	else:
		print('NO')


limit = 2 * 100000 + 1
sieve = [0] * limit
sieve[0] = 0
sieve[1] = 0
nearly_primes = []
t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	if n == 36:
		print('YES')
		print(5, end=' ')
		print(6, end=' ')
		print(10, end=' ')
		print(15)
		continue
	if n == 40:
		print('YES')
		print(6, end=' ')
		print(10, end=' ')
		print(15, end=' ')
		print(9)
		continue
	if n == 44:
		print('YES')
		print(6, end=' ')
		print(7, end=' ')
		print(10, end=' ')
		print(21)
		continue
	else:
		print('YES')
		num = n - 30
		print(6, end=' ')
		print(10, end=' ')
		print(14, end=' ')
		print(num)


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('No')
	else:
		print('Yes')
		ls = [14, 10, 6, n - 30]
		if n - 30 == 6:
			ls = [5, 15, 10, 6]
		if n - 30 == 10:
			ls = [15, 10, 14, 1]
		if n - 30 == 14:
			ls = [21, 15, 6, 2]
		print(*ls)


T = int(input())
for _ in range(T):
	x = int(input())
	if x in (36, 40, 44):
		print('YES')
		print(f'6 10 15 {x - 6 - 10 - 15}')
	elif x >= 31:
		print('YES')
		print(f'6 10 14 {x - 6 - 10 - 14}')
	else:
		print('NO')


t = int(input())
a_p = list()
prime = [2, 3, 5, 7, 9, 11, 13, 17, 19]
for i in range(len(prime)):
	for j in range(i + 1, len(prime)):
		a_p.append(prime[i] * prime[j])
a_p.sort()
for ex in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		(h1, h2, h3) = [0, 1, 2]
		found = False
		while h1 != len(a_p) and (not found):
			f = n - (a_p[h1] + a_p[h2] + a_p[h3])
			if a_p[h1] + a_p[h2] + a_p[h3] < n and f not in [a_p[h1], a_p[h2], a_p[h3]]:
				print('YES')
				print(*[a_p[h1], a_p[h2], a_p[h3]], f)
				found = True
				break
			elif h3 < len(a_p) - 1:
				h3 += 1
			elif h2 < len(a_p) - 1:
				h2 += 1
			elif h1 < len(a_p):
				h1 += 1
		if not found:
			print('NO')


import math
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		a = n - 30
		if n == 36:
			print('YES')
			print('5 6 10 15')
		elif n == 40:
			print('YES')
			print('6 10 15 9')
		elif n == 44:
			print('YES')
			print('9 6 14 15')
		else:
			print('YES')
			print(6, 10, 14, a)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		ans = 'YES'
		a = [6, 10, 14]
		b = n - 30
		if b in a:
			b = b + 14 - 15
			a[2] = 15
			print('YES')
			print(*a, b)
		else:
			s = str(6) + ' ' + str(10) + ' ' + str(14) + ' ' + str(b)
			print(ans)
			print(s)


import sys
for _ in range(int(input())):
	N = int(input())
	if N <= 30:
		print('NO')
		continue
	elif N == 36:
		print('YES')
		print('5 6 10 15')
		continue
	elif N == 40:
		print('YES')
		print('5 6 14 15')
		continue
	elif N == 44:
		print('YES')
		print('6 10 13 15')
		continue
	else:
		ls = [6, 10, 14]
		x = N - 30
		ls.append(x)
		ls.sort()
		print('YES')
		print(' '.join(map(str, ls)))


test_cases = int(input())
for i in range(test_cases):
	flint = int(input())
	if flint < 31:
		print('NO')
	else:
		print('YES')
		nearly_prime = [6, 10, 14]
		if flint - 30 in nearly_prime:
			print('6 10 15 ' + str(flint - 31))
		else:
			print('6 10 14 ' + str(flint - 30))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
		print('6 10 15', end=' ')
		print(n - 31)
	else:
		print('6 10 14', end=' ')
		print(n - 30)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
test = inp()
while test != 0:
	test = test - 1
	n = inp()
	li = [6, 14, 10]
	if n <= 30:
		print('NO')
	else:
		print('YES')
		c = n - 30
		if c in li:
			print('6 10 15 ' + str(c - 1))
		else:
			print('6 10 14 ' + str(c))


tests = int(input())
s = 6 + 10 + 14
s1 = 6 + 10 + 15
for i in range(tests):
	n = int(input())
	if n > s and (not n - s in (6, 14, 10)):
		print('YES')
		print(6, 10, 14, n - s)
	elif n > s1 and (not n - s1 in (6, 15, 10)):
		print('YES')
		print(6, 10, 15, n - s1)
	else:
		print('NO')


n = int(input())
result = []
for i in range(n):
	num = int(input())
	if num == 36:
		result.append([5, 6, 10, 15])
	elif num == 40:
		result.append([6, 10, 15, 9])
	elif num == 44:
		result.append([6, 7, 10, 21])
	elif num > 30:
		result.append([6, 10, 14, num - 30])
	else:
		result.append(0)
for i in result:
	if i == 0:
		print('NO')
	else:
		print('YES')
		for ele in i:
			print(ele, end=' ')
		print()


import math

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	ans = []
	for p in range(2, n + 1):
		if prime[p]:
			ans += [p]
	return ans
t = int(input())
here = SieveOfEratosthenes(int(math.sqrt(200000)))
alist = []
for i in range(len(here)):
	for j in range(i + 1, len(here)):
		alist.append(here[i] * here[j])
alist.sort()
here = alist
for _ in range(t):
	n = int(input())
	ans = 0
	x = 0
	q = []
	l = here[0] + here[1] + here[2]
	k = 1
	if n - l == here[0] or n - l == here[1] or n - l == here[2]:
		l = n - here[3] - here[0] - here[1]
		k = 0
	else:
		l = n - here[2] - here[0] - here[1]
	if l <= 0:
		print('NO')
	else:
		print('YES')
		if k == 1:
			print(here[0], here[1], here[2], l)
		else:
			print(here[0], here[1], here[3], l)


t = int(input())
for i in range(t):
	a = int(input())
	if a < 31:
		print('NO')
	elif a == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif a == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif a == 44:
		print('YES')
		print(6, 14, 15, 9)
	else:
		print('YES')
		print(6, 10, 14, a - 30)


t = int(input())
a = 6
b = 10
c = 14
s = 30
for inh in range(0, t):
	n = int(input())
	c = 14
	if n > s:
		print('YES')
		k = n - s
		if k == a or k == b or k == c:
			c = 15
			k -= 1
		print(a, b, c, k)
	else:
		print('NO')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	n = ip()
	ch = 6 + 10 + 14
	if n > ch:
		print('YES')
		if len(set([6, 10, 14, n - ch])) == 4:
			print(6, 10, 14, n - ch)
		else:
			print(6, 10, 15, n - (6 + 10 + 15))
	else:
		print('NO')


t = int(input())
while t:
	t = t - 1
	n = int(input())
	flag = 0
	q = n - 30
	if q > 0:
		if q == 6:
			p = 5
			flag = 4
		elif q == 10:
			p = 5
			flag = 2
		elif q == 14:
			p = 13
			flag = 3
		else:
			flag = 1
	if flag == 0:
		print('NO')
	elif flag == 1:
		print('YES')
		print(6, 10, 14, q)
	elif flag == 2:
		print('YES')
		print(6, 14, 15, 5)
	elif flag == 3:
		print('YES')
		print(6, 10, 15, 13)
	elif flag == 4:
		print('YES')
		print(6, 10, 15, 5)


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
		print('YES')
		print(6, 10, 14, n - 30)
	elif n - 31 > 0 and n - 31 != 6 and (n - 31 != 15) and (n - 31 != 10):
		print('YES')
		print(6, 10, 15, n - 31)
	elif n - 59 > 0 and n - 59 != 10 and (n - 59 != 35) and (n - 59 != 14):
		print('YES')
		print(10, 14, 35, n - 59)
	elif n - 71 > 0 and n - 71 != 15 and (n - 71 != 35) and (n - 71 != 21):
		print('YES')
		print(15, 21, 35, n - 75)
	else:
		print('NO')


def prime(n):
	for i in range(2, n):
		if n % i == 0:
			return False
	return True
for _ in range(int(input())):
	l = [6, 10, 14]
	c = 0
	i = 0
	j = 0
	n = int(input())
	if sum(l) > n:
		print('NO')
	else:
		c = n - sum(l)
		if c not in l and c != 0:
			print('YES')
			for i in l:
				print(i, end=' ')
			print(c)
		elif c == 0:
			print('NO')
		else:
			l.pop()
			l.append(15)
			c = n - sum(l)
			if c == 0:
				print('NO')
			else:
				print('YES')
				for i in l:
					print(i, end=' ')
				print(c)


from sys import stdin
for _ in range(int(input())):
	n = int(stdin.readline().rstrip())
	if n < 31:
		print('NO')
	else:
		print('YES')
		L = [6, 10, 14]
		r = n - 30
		if r in L:
			L = [6, 10, 15]
			r = n - sum(L)
		print(*L, r)


t = int(input())
for i in range(t):
	n = int(input())
	if n > 31:
		print('YES', end='\n')
		if n == 37:
			print('7 10 14', n - 31, end='\n')
		elif n == 41:
			print('6 11 14', n - 31, end='\n')
		elif n == 46:
			print('7 10 14', n - 31, end='\n')
		else:
			print('6 10 15', n - 31, end='\n')
	elif n == 31:
		print('YES', end='\n')
		print('6 10 14 1', end='\n')
	else:
		print('NO', end='\n')


c = int(input())
for i in range(c):
	n = int(input())
	if n >= 31:
		s = set()
		s.add(6)
		s.add(10)
		s.add(14)
		s.add(n - 30)
		if len(s) == 4:
			print('YES')
			for j in s:
				print(j, end=' ')
		else:
			print('YES')
			print('6 10 15', n - 31)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	arr = [6, 10, 14, 15]
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		c1 = n - 30
		c2 = n - 31
		if c1 not in [6, 10, 14]:
			print('YES')
			print(str(6), str(10), str(14), str(c1))
		else:
			print('YES')
			print(str(6), str(10), str(15), str(c2))


t = int(input())
for _ in range(t):
	n = int(input())
	x = 6 + 10 + 14
	if n > x:
		if n == 30:
			print('NO')
		else:
			print('YES')
			z = n - (6 + 10 + 14)
			if z == 6:
				print(10, 15, 5, 6)
			elif z == 10:
				print(14, 6, 15, 5)
			elif z == 14:
				print(10, 6, 15, 13)
			else:
				print(6, 10, 14, n - (6 + 10 + 14))
	else:
		print('NO')


import math

def function(n):
	p_l = [6, 10, 14, 15, 21]
	if n < 31:
		print('NO')
	elif n == 36 or n == 40 or n == 44:
		print('YES')
		print(f'{6} {10} {15} {n - 31}')
	else:
		print('YES')
		print(f'{6} {10} {14} {n - 30}')
t = int(input())
for i in range(t):
	n = int(input())
	function(n)


t = int(input())
close_prime_n = [6, 10, 14, 15, 21, 22]
for _ in range(t):
	n = int(input())
	close_prime = {6, 10, 14}
	cur_ptr = 3
	if n < 31:
		print('NO')
	elif n - 30 in close_prime:
		while n - sum(close_prime) in close_prime and cur_ptr < 6:
			close_prime.remove(max(close_prime))
			close_prime.add(close_prime_n[cur_ptr])
			cur_ptr += 1
		if sum(close_prime) < n:
			print('YES')
			for e in close_prime:
				print(e, end=' ')
			print(n - sum(close_prime))
		else:
			print('No')
	else:
		print('YES')
		print(6, 10, 14, n - 30)


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n <= 30:
			print('NO')
		elif n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
			print('YES')
			print(6, 10, 14, n - 30)
		else:
			print('YES')
			print(10, 6, 15, n - 31)
main()


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	n = sInt()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(int(input())):
	n = int(input())
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(5, 6, 14, 15)
	elif n == 44:
		print('YES')
		print(5, 10, 14, 15)
	elif n > 30:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		lis = []
		if n - 30 in [6, 10, 14]:
			lis = [6, 10, 15, n - 31]
		else:
			lis = [6, 10, 14, n - 30]
		print(*lis, sep=' ')


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def main():
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		s = n - (6 + 10 + 14)
		if s == 6:
			print(6, 10, 15, 5)
		elif s == 10:
			print(6, 10, 15, 9)
		elif s == 14:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, s)
t = int(input())
for _ in range(t):
	main()


arr = [6, 10, 14, 15, 21, 22]
for _ in range(int(input())):
	n = int(input())
	check = 0
	for i in range(6):
		for j in range(i + 1, 6):
			for k in range(j + 1, 6):
				if not check and n - arr[i] - arr[j] - arr[k] > 0 and (4 == len({arr[i], arr[j], arr[k], n - arr[i] - arr[j] - arr[k]})):
					print('YES')
					print(arr[i], arr[j], arr[k], n - arr[i] - arr[j] - arr[k])
					check = 1
	if check == 0:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		r1 = '6 10 14 '
		r2 = '6 10 15 '
		print('YES')
		r = n - 30
		if r == 6 or r == 10 or r == 14:
			print(r2 + str(r - 1))
		else:
			print(r1 + str(r))


import sys
readline = sys.stdin.readline
T = int(readline())
Ans = []
for _ in range(T):
	N = int(readline())
	Ans.append('YES')
	if N == 36:
		Ans.append('6 10 15 5')
	elif N == 40:
		Ans.append('6 10 15 9')
	elif N == 44:
		Ans.append('6 10 15 13')
	elif N >= 31:
		Ans.append(' '.join(map(str, [6, 10, 14, N - 30])))
	else:
		Ans.pop()
		Ans.append('NO')
print('\n'.join(Ans))


for _ in range(eval(input())):
	inp = eval(input())
	if inp > 30:
		print('YES')
		already = [6, 10, 14]
		if inp - 30 in already:
			already[2] = 15
			already.append(inp - 31)
		else:
			already.append(inp - 30)
		already = list(map(str, already))
		print(' '.join(already))
	else:
		print('NO')


num = int(input())
for i in range(num):
	nums = int(input())
	if nums < 30:
		print('NO')
	elif nums > 30 and nums - 30 != 6 and (nums - 30 != 10) and (nums - 30 != 14):
		print('YES')
		print(6, 10, 14, nums - 30)
	elif nums > 31:
		print('YES')
		print(6, 10, 15, nums - 31)
	else:
		print('NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	N = int(input())
	x = N - 6 - 10 - 14
	if x <= 0:
		print('NO')
	else:
		print('YES')
		x = N - 6 - 10 - 14
		if x == 6:
			print(5, 6, 10, 15)
		elif x == 10:
			print(6, 9, 10, 15)
		elif x == 14:
			print(6, 10, 13, 15)
		else:
			print(6, 10, 14, x)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	a = 6
	b = 10
	c = 14
	if n < a + b + c + 1:
		print('NO')
	else:
		if n == 36:
			c = 15
		elif n == 40:
			c = 15
		elif n == 44:
			c = 15
		print('YES')
		print(a, b, c, n - a - b - c)


def solution(N):
	const = 6 + 10 + 14
	if N <= const:
		return 'NO'
	elif N - const in {6, 10, 14}:
		const = 6 + 10 + 15
		return f'YES\n6 10 15 {N - const}'
	else:
		return f'YES\n6 10 14 {N - const}'
t = int(input())
for _ in range(t):
	n = int(input())
	print(solution(n))


from sys import stdin
from collections import defaultdict
input = stdin.readline
t = int(input())
for _ in range(t):
	z = int(input())
	if z > 30:
		if z - 30 == 6 or z - 30 == 10 or z - 30 == 14:
			print('YES')
			print(6, 10, 15, z - 31)
		else:
			print('YES')
			print(6, 10, 14, z - 30)
	else:
		print('NO')


T = int(input())

def solve():
	N = int(input())
	if N > 30:
		if N == 36:
			print('YES')
			print('{} {} {} {}'.format(6, 10, 15, 5))
		elif N == 40:
			print('YES')
			print('{} {} {} {}'.format(6, 10, 15, 9))
		elif N == 44:
			print('YES')
			print('{} {} {} {}'.format(6, 10, 15, 13))
		else:
			print('YES')
			print('{} {} {} {}'.format(2 * 3, 2 * 5, 2 * 7, N - 2 * (3 + 5 + 7)))
	else:
		print('NO')
for _ in range(T):
	solve()


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n in [36, 44, 40]:
		print('YES')
		print('6 10 15 ', end='')
		print(n - 31)
	else:
		print('YES')
		print('6 10 14 ', end='')
		print(n - 30)


t = int(input())
prime = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
multi = []
for i in prime:
	for j in prime:
		if i != j and i * j not in multi:
			multi.append(i * j)
for _ in range(t):
	num = 0
	number = int(input())
	if number <= 30:
		print('NO')
	for i1 in multi:
		if num > 0:
			break
		for i2 in multi:
			if num > 0:
				break
			if i2 == i1:
				continue
			for i3 in multi:
				if num > 0:
					break
				if i2 == i3 and i3 == i1:
					continue
				try:
					num = number - i1 - i2 - i3
					if num == i1 or num == i2 or num == i3 or (i1 == i2) or (i2 == i3) or (i1 == i3):
						num = 0
						continue
					elif num > 0:
						print('YES')
						print(i1, i2, i3, num)
						break
					else:
						num = 0
				except:
					sum = 0


np = [6, 10, 14, 15]
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		r = n - 30
		if r != 6 and r != 10 and (r != 14):
			print(6, 10, 14, r)
		else:
			print(6, 10, 15, r - 1)


case = int(input())
for caseNum in range(0, case):
	n = int(input())
	if n > 30:
		print('YES')
		minus = n - 30
		(a, b, c) = (6, 10, 14)
		if minus == 6 or minus == 10 or minus == 14:
			c = 15
			minus -= 1
		print(a, b, c, minus)
	else:
		print('NO')


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		a = 2 * 3
		b = 2 * 5
		c = 2 * 7
		d = n - (a + b + c)
		if a != d and d != c and (b != d):
			print('YES')
			print(a, b, c, d)
			continue
		else:
			a = 2 * 3
			b = 2 * 5
			c = 3 * 5
			d = n - (a + b + c)
			if a != d and d != c and (b != d):
				print('YES')
				print(a, b, c, d)
				continue
			else:
				print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		a = [36, 40, 44]
		if n in a:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


T = int(input())
for _ in range(T):
	n = int(input())
	if n > 30:
		print('YES')
		x = n - 30
		if x == 6:
			print(6, end=' ')
			print(10, end=' ')
			print(5, end=' ')
			print(15)
		elif x == 10:
			print(6, end=' ')
			print(10, end=' ')
			print(15, end=' ')
			print(9)
		elif x == 14:
			print(6, end=' ')
			print(7, end=' ')
			print(10, end=' ')
			print(21)
		else:
			print(6, end=' ')
			print(10, end=' ')
			print(14, end=' ')
			print(n - 30)
	else:
		print('NO')


t = int(input())
for i in range(t):
	val = int(input())
	if val < 31:
		print('NO')
	else:
		print('YES')
		if val == 36 or val == 40 or val == 44:
			print('6 10 15 ' + str(val - 31))
		else:
			print('6 10 14 ' + str(val - 30))


for _ in range(int(input())):
	n = int(input())
	l = [6, 10, 14]
	if n > 30:
		l.append(n - 30)
		if len(set(l)) == 4:
			print('YES')
			print(*l)
		elif n > 31:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('NO')
	else:
		print('NO')


for test in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		near = [6, 10, 14, 15, 21, 35]
		ans = []
		for i in near:
			if i == n - i or n - i in ans:
				continue
			ans.append(i)
			n -= i
			if len(ans) == 3:
				break
		if n > 0:
			print('YES')
			ans.append(n)
			print(*ans)
		else:
			print('NO')


for _ in range(int(input())):
	a = int(input())
	if a > 0 and a <= 30:
		print('NO')
	if a == 36:
		print('YES')
		print(5, 6, 10, 15)
	if a == 44:
		print('YES')
		print(6, 7, 10, 21)
	if a == 40:
		print('YES')
		print(6, 10, 21, 3)
	if a > 30 and a != 36 and (a != 40) and (a != 44):
		print('YES')
		print(6, 10, 14, a - 30)


import sys
perfect = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205, 206, 209, 213, 214, 215, 217, 218, 219, 221, 226, 235, 237, 247, 249, 253, 254, 259, 262, 265, 267, 274, 278, 287, 291, 295, 298, 299, 301, 303, 305, 309, 319, 321, 323, 327, 329, 335, 339, 341, 355, 365, 371, 377, 381, 391, 393, 395, 403, 407, 411, 413, 415, 417, 427, 437, 445, 447, 451, 469, 473, 481, 485, 493, 497, 505, 511, 515, 517, 527, 533, 535, 545, 551, 553, 559, 565, 581, 583, 589, 611, 623, 629, 635, 649, 655, 667, 671, 679, 685, 689, 695, 697, 703, 707, 713, 721, 731, 737, 745, 749, 763, 767, 779, 781, 791, 793, 799, 803, 817, 851, 869, 871, 889, 893, 899, 901, 913, 917, 923, 943, 949, 959, 973, 979, 989, 1003, 1007, 1027, 1037, 1043, 1067, 1073, 1079, 1081, 1111, 1121, 1133, 1139, 1147, 1157, 1159, 1177, 1189, 1199, 1207, 1219, 1241, 1243, 1247, 1261, 1271, 1273, 1313, 1333, 1339, 1343, 1349, 1357, 1363, 1387, 1391, 1397, 1403, 1411, 1417, 1441, 1457, 1469, 1501, 1507, 1513, 1517, 1529, 1537, 1541, 1577, 1591, 1633, 1639, 1643, 1649, 1651, 1679, 1691, 1703, 1711, 1717, 1739, 1751, 1763, 1769, 1781, 1807, 1817, 1819, 1829, 1843, 1853, 1891, 1909, 1919, 1921, 1927, 1937, 1943, 1957, 1961, 2021, 2033, 2047, 2059, 2071, 2077, 2117, 2147, 2159, 2173, 2183, 2201, 2227, 2231, 2257, 2263, 2279, 2291, 2323, 2329, 2363, 2369, 2407, 2413, 2419, 2449, 2461, 2479, 2489, 2491, 2501, 2507, 2533, 2537, 2573, 2581, 2599, 2603, 2623, 2627, 2641, 2701, 2747, 2759, 2773, 2813, 2831, 2867, 2881, 2911, 2921, 2923, 2929, 2987, 2993, 3007, 3013, 3053, 3071, 3103, 3127, 3131, 3139, 3149, 3151, 3161, 3193, 3197, 3233, 3239, 3277, 3293, 3317, 3337, 3379, 3397, 3403, 3427, 3431, 3503, 3551, 3569, 3589, 3599, 3649, 3683, 3713, 3737, 3763, 3799, 3811, 3827, 3869, 3901, 3937, 3953, 3959, 3973, 3977, 4031, 4033, 4061, 4087, 4141, 4171, 4181, 4183, 4187, 4189, 4223, 4247, 4307, 4309, 4321, 4331, 4343, 4387, 4399, 4429, 4453, 4469, 4559, 4601, 4619, 4633, 4661, 4687, 4699, 4717, 4747, 4757, 4819, 4841, 4847, 4859, 4891, 4897, 5029, 5063, 5069, 5123, 5141, 5143, 5183, 5207, 5251, 5293, 5311, 5353, 5371, 5429, 5459, 5461, 5513, 5561, 5609, 5617, 5633, 5671, 5699, 5723, 5767, 5777, 5891, 5893, 5917, 5959, 5963, 5969, 5977, 5989, 6059, 6077, 6109, 6157, 6161, 6283, 6313, 6319, 6407, 6431, 6439, 6497, 6499, 6527, 6533, 6557, 6649, 6667, 6731, 6767, 6887, 6893, 6901, 6943, 7003, 7031, 7081, 7169, 7171, 7261, 7303, 7313, 7367, 7373, 7387, 7493, 7519, 7571, 7597, 7663, 7729, 7739, 7747, 7811, 7897, 7957, 7979, 7991, 8023, 8051, 8083, 8137, 8201, 8249, 8357, 8383, 8453, 8479, 8509, 8549, 8611, 8633, 8777, 8791, 8881, 8927, 8989, 9017, 9047, 9089, 9167, 9179, 9271, 9301, 9313, 9379, 9523, 9563, 9701, 9727, 9797, 9869, 9983, 9991, 10001, 10033, 10057, 10147, 10349, 10379, 10403, 10541, 10573, 10579, 10807, 10823, 10873, 10877, 10961, 10981, 11009, 11021, 11227, 11303, 11371, 11413, 11537, 11639, 11659, 11663, 11771, 12091, 12193, 12317, 12319, 12367, 12371, 12707, 12827, 13081, 13231, 13261, 13289, 13483, 13493, 13589, 13837, 13843, 14017, 14039, 14111, 14279, 14317, 14351, 14453, 14659, 14803, 14873, 14933, 15049, 15151, 15347, 15481, 15707, 15943, 16241, 16637, 16837, 17399, 17653, 17947, 18209, 18923, 19043, 19519, 20413, 20711]

def solve(n):
	s = 6 + 10 + 14
	if n > s:
		sol = (6, 10, 14, n - s)
		if len(set(sol)) == 4:
			return sol
		else:
			s = 6 + 10 + 15
			if n > s:
				return (6, 10, 15, n - s)
			else:
				return None
	return None

def main(cases):
	for case in cases:
		s = solve(case)
		if s:
			print('YES')
			print(' '.join((str(d) for d in s)))
		else:
			print('NO')
cases = []
for (e, line) in enumerate(sys.stdin.readlines()):
	if e == 0:
		continue
	cases.append(int(line.strip()))
main(cases)


for _ in range(int(input())):
	n = int(input())
	ans = [6, 10, 14, 15, 21, 22, 26]
	check = False
	for i in ans:
		for j in ans:
			for k in ans:
				if n > i + j + k and n - i - j - k != i and (n - i - j - k != j) and (n - i - j - k != k) and (i != j) and (j != k) and (i != k):
					print('YES')
					print(i, j, k, n - i - j - k)
					check = True
					break
			if check:
				break
		if check:
			break
	if not check:
		print('NO')


def solve(n):
	first = 6
	second = 10
	third = 14
	if n <= first + second + third:
		print('NO')
	else:
		diff = n - first - second - third
		if diff == first or diff == second or diff == third:
			third = 15
		diff = n - first - second - third
		numbers = [first, second, third, diff]
		print('YES')
		print(*numbers)
t = int(input())
for i in range(t):
	n = int(input())
	solve(n)


class Main:

	def main(self):
		t = int(input())
		for t1 in range(0, t):
			n = int(input())
			a = 6
			b = 10
			c = 14
			d = n - a - b - c
			if d < 1:
				print('NO')
			else:
				if d == a or d == b or d == c:
					c += 1
					d -= 1
				print('YES')
				print('{0} {1} {2} {3}'.format(a, b, c, d))
Main().main()


n = int(input())
for i in range(0, n):
	o = int(input())
	if o < 6 + 10 + 14:
		print('NO')
	else:
		L = [6, 10, 14]
		P = o - (6 + 10 + 14)
		if P in L:
			P = o - (6 + 10 + 15)
			if P <= 0:
				print('NO')
			else:
				print('YES')
				print(6, 10, 15, o - (6 + 10 + 15))
		elif P == 0:
			print('NO')
		else:
			print('YES')
			print(6, 10, 14, o - (6 + 10 + 14))


t = int(input())
for some_num in range(0, t):
	sn = 6 + 10 + 14
	n = int(input())
	if n > sn:
		print('YES')
		if n == 36:
			print('6 10 15 5')
		elif n == 40:
			print('6 10 15 9')
		elif n == 44:
			print('6 10 21 7')
		else:
			print('6 10 14', n - sn)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		n -= 6 + 10 + 14
		if n == 6 or n == 10 or n == 14:
			print('YES')
			print(' '.join(['6', '10', '15', str(n - 1)]))
		else:
			print('YES')
			print(' '.join(['6', '10', '14', str(n)]))


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	if n > 30:
		if n == 36 or n == 40 or n == 44:
			a = 6
			b = 10
			c = 15
			y = n - (a + b + c)
		else:
			a = 6
			b = 10
			c = 14
			y = n - (a + b + c)
		print('YES')
		print(a, end=' ')
		print(b, end=' ')
		print(c, end=' ')
		print(y)
	else:
		print('NO')


def solve():
	n = int(input())
	if n <= 30:
		print('NO')
		return
	n -= 30
	(a, b, c) = (6, 10, 14)
	if n == 6 or n == 10 or n == 14:
		c = 15
		n -= 1
	print('YES')
	print(a, b, c, n)
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	a = 6
	b = 10
	c = 14
	d = a + b + c
	e = n - d
	if n > d:
		print('YES')
		if a != e and b != e and (c != e):
			print(a, b, c, n - d)
		else:
			print(6, 10, 15, n - 31)
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('3 6 10 21')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		a = 6
		b = 10
		c = 14
		d = n - 30
		print(a, b, c, d)


for test in range(int(input())):
	n = int(input())
	c = 6 + 10 + 14
	if n - c >= 1:
		print('YES')
		if n - c == 6 or n - c == 10 or n - c == 14:
			print(6, 10, 15, n - c - 1)
		else:
			print(6, 10, 14, n - c)
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	if n > 30:
		print('YES')
		if n == 36 or n == 44 or n == 40:
			if n == 36:
				print('5 6 10 15')
			elif n == 44:
				print('6 7 10 21')
			elif n == 40:
				print('6 10 21 3')
		else:
			print('6 10 14 %d' % (n - 30))
	else:
		print('NO')
	t -= 1


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		if n <= 30:
			print('NO')
		else:
			print('YES')
			if n - 30 == 6:
				print(6, 10, 15, n - 31)
			elif n - 30 == 14:
				print(6, 10, 15, n - 31)
			elif n - 30 == 10:
				print(6, 14, 15, n - 35)
			else:
				print(6, 10, 14, n - 30)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	(n1, n2, n3) = (6, 10, 14)
	if n <= 30:
		print('NO')
		continue
	n4 = n - 30
	print('YES')
	if n1 == n4 or n4 == n2 or n4 == n3:
		print(n1, n2, 15, n - 31)
	else:
		print(n1, n2, 14, n - 30)


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


def solve(n):
	sums = {36: [6, 10, 15, 5], 40: [6, 10, 15, 9], 44: [6, 10, 15, 13]}
	if n <= 30:
		return -1
	elif n in sums.keys():
		return sums[n]
	else:
		return [6, 10, 14, n - 30]
t = int(input())
for i in range(0, t):
	n = int(input())
	ans = solve(n)
	if ans == -1:
		print('NO')
	else:
		print('YES')
		print(' '.join([str(i) for i in ans]))


a = [14, 15, 21, 22, 26, 33, 35, 39]
for t in range(int(input())):
	n = int(input())
	x = 6
	y = 10
	for i in a:
		z = i
		p = n - x - y - z
		if p > 0 and x != y and (x != z) and (x != p) and (y != z) and (y != p) and (z != p):
			print('YES')
			print(x, y, z, p)
			break
	else:
		print('NO')


m = int(input())
dic1 = {6, 10, 14}
dic2 = {6, 10, 15}
dic3 = {6, 14, 15}
dic4 = {10, 14, 15}
dic5 = {6, 10, 21}
for _ in range(m):
	n = int(input())
	if n > 30 and n - 30 not in dic1:
		print('YES')
		print(6, 10, 14, n - 30)
	elif n > 31 and n - 31 not in dic2:
		print('YES')
		print(6, 10, 15, n - 31)
	elif n > 35 and n - 35 not in dic3:
		print('YES')
		print(6, 14, 15, n - 35)
	elif n > 39 and n - 39 not in dic4:
		print('YES')
		print(10, 14, 15, n - 39)
	elif n > 37 and n - 37 not in dic5:
		print('YES')
		print(6, 10, 21)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('no')
	else:
		print('Yes')
		if n != 36 and n != 44 and (n != 40):
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


from collections import defaultdict as dc
import sys
import math
mod = 10 ** 9 + 7

def sinp():
	p = str(sys.stdin.readline())
	return p

def seive(n):
	p = [0] * (n + 1)
	for i in range(2, n):
		for j in range(2 * i, n + 1, i):
			p[i] = 1
	return p

def inp():
	p = int(sys.stdin.readline())
	return p

def line():
	p = list(map(int, sys.stdin.readline().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def ind(a):
	return ord(a) - ord('A')

def digit(n):
	p = [int(i) for i in str(n)]
	return p

def check(p, n):
	l = str(p)
	s = ''
	for i in range(n):
		s = s + bin(int(l[i]))[2:]
	s = s[:-n]
	if s == '':
		return 0
	return int(s, 2)
t = inp()
for _ in range(t):
	n = inp()
	mn = 6 + 10 + 14
	if n <= mn:
		print('NO')
	else:
		z = n - mn
		print('YES')
		if z == 6:
			print(1, 6, 14, 15)
		elif z == 10:
			print(3, 6, 10, 21)
		elif z == 14:
			print(2, 6, 10, 26)
		else:
			print(z, 6, 10, 14)


T = int(input())
for _ in range(0, T):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		tt = n - 30
		if tt == 6 or tt == 10 or tt == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)


T = int(input())
for t in range(T):
	funny = 30
	x = int(input())
	if x <= funny:
		print('NO')
	elif x == 36:
		print('YES')
		print('1 6 14 15')
	elif x == 40:
		print('YES')
		print('2 6 10 22')
	elif x == 44:
		print('YES')
		print('5 10 14 15')
	else:
		print('YES')
		print('6 10 14', x - 30)


t = int(input())
while t > 0:
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 31 + 1 == 6 or n - 31 + 1 == 10 or n - 31 + 1 == 14:
			print(str(n - 31) + ' ' + '6 ' + '10 ' + '15')
		else:
			print(str(n - 31 + 1) + ' ' + '6 ' + '10 ' + '14')
	t -= 1


def goodstring(s):
	if s <= 30:
		print('NO')
	elif s == 36 or s == 40 or s == 44:
		print('YES')
		print(6, end=' ')
		print(10, end=' ')
		print(15, end=' ')
		print(s - 31)
	else:
		print('YES')
		print(6, end=' ')
		print(10, end=' ')
		print(14, end=' ')
		print(s - 30)
t = int(input())
for t_itr in range(t):
	s = int(input())
	goodstring(s)


t = int(input())
for i in range(t):
	n = int(input())
	x = n - (6 + 10 + 14)
	if x <= 0:
		print('no')
	elif x != 6 and x != 10 and (x != 14):
		print('yes')
		print(x, 6, 10, 14)
	elif x == 6 and x != 10 and (x != 14):
		print('yes')
		print(5, 6, 10, 15)
	elif x != 6 and x == 10 and (x != 14):
		print('yes')
		print(5, 6, 14, 15)
	elif x != 6 and x != 10 and (x == 14):
		print('yes')
		print(6, 10, 15, 13)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(m,) = I()
while m:
	m -= 1
	(k,) = I()
	if k > 30:
		print('YES')
		if k - 30 == 6 or k - 30 == 10 or k - 30 == 14:
			print(6, 10, 15, k - 31)
		else:
			print(6, 10, 14, k - 30)
	else:
		print('NO')


T = int(input())
for i in range(T):
	n = int(input())
	p = 3
	lst = []
	T = n
	for j in range(3):
		l = 2 * p
		T = T - l
		lst.append(l)
		p = p + 2
	if T > 0:
		if T in lst:
			lst[2] = 15
			T = T - 1
			lst.append(T)
			print('YES')
			print(*lst)
		else:
			lst.append(T)
			print('YES')
			print(*lst)
	else:
		print('NO')


t = int(input())
for hh in range(0, t):
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		if n <= 30:
			print('NO')
		else:
			d = n - 30
			print('YES')
			if d not in [6, 14, 10]:
				print(6, 10, 14, d)
			else:
				print(6, 10, 15, d - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	(a, b, c) = (6, 10, 14)
	temp = n - (a + b + c)
	if n > 30:
		if temp != a and temp != b and (temp != c):
			print('YES')
			print(a, b, c, n - 30)
		else:
			c = 15
			print('YES')
			print(a, b, c, n - (a + b + c))
	else:
		print('NO')


def func(num):
	if num <= 30:
		print('NO')
	else:
		print('YES')
		b = {6, 10, 14}
		if num - 30 not in b:
			print(*b, num - 30)
		else:
			print(6, 10, 15, num - 31)
t = int(input())
for _ in range(t):
	a = int(input())
	func(a)


num = [6, 10, 14, 15, 21, 22, 25, 26]
n = int(input())
for i in range(n):
	t = int(input())
	if t <= 30:
		print('NO')
	else:
		flag = 0
		(a, b, c) = (0, 1, 2)
		d = t - num[a] - num[b] - num[c]
		while d == num[a] or d == num[b] or d == num[c]:
			c += 1
			d = t - num[a] - num[b] - num[c]
			if d <= 0:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')
			print(num[a], num[b], num[c], d)


import math
tc = int(input())
for ctr in range(tc):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


import itertools
for _ in range(int(input())):
	n = int(input())
	l = {2 * 3, 2 * 5, 2 * 7, 3 * 5, 3 * 7, 2 * 11, 3 * 11, 5 * 7}
	ss = list(itertools.combinations(l, 3))
	if n <= 30:
		print('NO')
	else:
		f = 0
		for i in ss:
			d = n
			s = sum(i)
			if n - s > 0 and n - s not in i:
				print('YES')
				print(*i, n - s)
				f = 1
				break
		if f == 0:
			print('NO')


import sys
input = lambda : sys.stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	n = INT()
	if n > 30:
		print('YES')
		if n - 30 in (6, 14, 10):
			print(n - 35, 6, 14, 15)
		else:
			print(n - 30, 6, 14, 10)
	else:
		print('NO')


TT = int(input())
while TT:
	NN = int(input())
	if NN <= 30:
		print('NO')
	else:
		XX = NN - 30
		print('YES')
		if XX == 6 or XX == 10 or XX == 14:
			print(6, 10, 15, XX - 1, end=' ')
		else:
			print(6, 10, 14, XX, end=' ')
	TT -= 1


import sys
readline = lambda : sys.stdin.readline().strip('\n')
readgen = lambda : map(int, readline().split())
for _ in range(int(input())):
	n = int(input())
	l1 = [6, 10, 14, n - 30]
	flag = l1[-1] > 0 and l1[-1] not in l1[:-1]
	if flag:
		print('YES')
		print(' '.join(map(str, l1)))
		continue
	l1 = [6, 10, 15, n - 31]
	flag = l1[-1] > 0 and l1[-1] not in l1[:-1]
	if flag:
		print('YES')
		print(' '.join(map(str, l1)))
		continue
	print('NO')


from sys import stdin
t = int(stdin.readline().strip())
for _ in range(t):
	n = int(stdin.readline().strip())
	if n >= 31:
		print('YES')
		if n - 6 - 10 - 14 not in (6, 10, 14):
			print(6, 10, 14, n - 6 - 10 - 14)
		else:
			print(6, 10, 15, n - 6 - 10 - 15)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		last_num = n - 30
		if n - 30 == 6:
			print(n - (10 + 6 + 15), 10, 6, 15)
		elif n - 30 == 14:
			print(n - (10 + 6 + 21), 10, 6, 21)
		elif n - 30 == 10:
			print(n - (14 + 6 + 15), 14, 6, 15)
		else:
			print(14, 10, 6, n - 30)


t = int(input())
for i in range(t):
	n = int(input())
	a = [6, 10, 14]
	if n > 30:
		res = n - 30
		if res == 6:
			a.remove(14)
			a.append(15)
			a.append(5)
			print('YES')
			print(*a)
		elif res == 10:
			a.remove(10)
			a.append(15)
			a.append(5)
			print('YES')
			print(*a)
		elif res == 14:
			a.remove(14)
			a.append(21)
			a.append(7)
			print('YES')
			print(*a)
		else:
			a.append(n - 30)
			print('YES')
			print(*a)
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	elif n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
		if n - 31 == 6 or n - 31 == 10 or n - 31 == 15:
			if n - 37 == 6 or n - 37 == 10 or n - 37 == 21:
				if n - 38 == 6 or n - 38 == 10 or n - 38 == 22:
					if n - 42 == 6 or n - 42 == 10 or n - 42 == 26:
						print('NO')
					else:
						print('YES')
						print(6, 10, 26, n - 42)
				else:
					print('YES')
					print(6, 10, 22, n - 38)
			else:
				print('YES')
				print(6, 10, 21, n - 37)
		else:
			print('YES')
			print(6, 10, 15, n - 31)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		if n > 30:
			rr.append('YES')
			if n - 30 in [6, 10, 14]:
				rr.append(JA([6, 10, 15, n - 31], ' '))
			else:
				rr.append(JA([6, 10, 14, n - 30], ' '))
		else:
			rr.append('NO')
	return JA(rr, '\n')
print(main())


np1 = 6
np2 = 10
np3 = 14
su = np1 + np2 + np3
for i in range(int(input())):
	n = int(input())
	if n <= su:
		print('NO')
	else:
		print('YES')
		if n - su not in [6, 10, 14]:
			print(' '.join([str(np1), str(np2), str(np3), str(n - su)]))
		else:
			print(' '.join([str(np1), str(np2), str(15), str(n - 15 - 10 - 6)]))


query = int(input())
for _ in range(query):
	a = 6
	b = 10
	c = 14
	n = int(input())
	if n > 30:
		print('YES')
		r = n - 30
		if r == a:
			b += 5
			r -= 5
		elif r == b:
			c += 1
			r -= 1
		elif c == r:
			a += 9
			r -= 9
		print(' '.join(map(str, [a, b, c, r])))
	else:
		print('NO')


try:
	t = int(input())
	while t:
		n = int(input())
		z = n - 30
		if z > 0:
			if n != 36 and n != 40 and (n != 44):
				print('YES')
				print('6', '10', '14', z)
			elif n == 36:
				print('YES')
				print('5', '6', '10', '15')
			elif n == 40:
				print('YES')
				print('6', '9', '10', '15')
			elif n == 44:
				print('YES')
				print('6', '10', '13', '15')
		else:
			print('NO')
		t -= 1
except:
	pass


for _ in range(int(input())):
	n = int(input())
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(5, 6, 14, 15)
	elif n == 44:
		print('YES')
		print(6, 10, 13, 15)
	elif 6 + 10 + 14 + 1 > n:
		print('NO')
	else:
		print('YES')
		print(6, 10, 14, n - 6 - 10 - 14)


import sys
sys.setrecursionlimit(int(100000.0))
MAXN = int(200000.0 + 5)
prime = [0] * MAXN
prime[0] = prime[1] = 1
for i in range(2, MAXN):
	if prime[i] == 0:
		for j in range(2 * i, MAXN, i):
			prime[j] = i
nearlyprime = []
for i in range(1, MAXN):
	if prime[i] != 0 and i // prime[i] != prime[i] and (prime[i // prime[i]] == 0):
		nearlyprime.append(i)

def solve(n, c):
	global flag
	global ans
	if n <= 0:
		return
	if c == 3:
		if n not in ans:
			flag = True
			ans[c] = n
		return
	ind = 0
	while ind < len(nearlyprime) and nearlyprime[ind] < n:
		if flag:
			break
		if nearlyprime[ind] not in ans:
			ans[c] = nearlyprime[ind]
			solve(n - nearlyprime[ind], c + 1)
		ind += 1
for _ in range(int(input())):
	n = int(input())
	if n < 30:
		print('NO')
	else:
		flag = False
		ans = [-1, -1, -1, -1]
		solve(n, 0)
		if not flag:
			print('NO')
		else:
			print('YES')
			print(*ans)


t = int(input())
for _ in range(t):
	a = 2 * 3 + 2 * 5 + 2 * 7
	num = int(input())
	if num <= a:
		print('NO')
	else:
		r = num - a
		print('YES')
		if r == 6:
			print(2 * 3, 2 * 5, 3 * 5, 5)
		elif r == 10:
			print(2 * 3, 2 * 5, 2 * 11, 2)
		elif r == 14:
			print(2 * 3, 3 * 5, 2 * 11, 1)
		else:
			print(6, 10, 14, num - a)


for _ in range(int(input())):
	t = int(input())
	if t > 30:
		d = t - (6 + 10 + 14)
		if d != 6 and d != 10 and (d != 14):
			print('YES')
			print('6' + ' ' + '10' + ' ' + '14' + ' ' + str(d))
		elif t == 36:
			print('YES')
			print('6' + ' ' + '10' + ' ' + '15' + ' ' + '5')
		elif t == 40:
			print('YES')
			print('10' + ' ' + '14' + ' ' + '15' + ' ' + '1')
		elif t == 44:
			print('YES')
			print('10' + ' ' + '14' + ' ' + '15' + ' ' + '5')
		else:
			print('NO')
	else:
		print('NO')


import sys
import math
from math import *
from collections import defaultdict
import os
import sys
from io import BytesIO, IOBase
from collections import deque

def main():
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
for i in range(int(input())):
	main()


import sys
import math
from collections import Counter
import heapq
try:
	for _ in range(int(input())):
		a = 6
		b = 10
		c = 14
		d = 15
		e = 21
		n = int(input())
		if n < a + b + c + 1:
			print('NO')
		elif n - a - b - c != a and n - a - b - c != b and (n - a - b - c != c):
			print('YES')
			print(a, b, c, n - a - b - c)
		else:
			c = d
			if n - a - b - c != a and n - a - b - c != b and (n - a - b - c != c):
				print('YES')
				print(a, b, c, n - a - b - c)
			else:
				c = e
				if n - a - b - c != a and n - a - b - c != b and (n - a - b - c != c):
					print('YES')
					print(a, b, c, n - a - b - c)
except:
	pass


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(5, 6, 14, 15)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	else:
		k = n - 30
		ans = [6, 10, 14]
		ans.append(k)
		ans.sort()
		print('YES')
		print(*ans)


t = int(input())
for k in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 31:
		print('YES')
		print(6, 10, 14, 1)
	else:
		arr = [6, 10, 14]
		print('YES')
		flag = True
		temp = n - 30
		for i in range(3):
			if arr[i] == temp:
				flag = False
				num = arr[i]
				break
		if flag:
			print(6, 10, 14, end=' ')
			print(temp)
		elif temp == 6:
			temp1 = n - 31
			print(6, 10, 15, temp1)
		elif temp == 10:
			temp2 = n - 31
			print(6, 10, 15, temp2)
		else:
			temp3 = n - 31
			print(6, 10, 15, temp3)


from sys import *
t = int(stdin.readline())
while t > 0:
	n = int(stdin.readline())
	if n > 30:
		print('YES')
		if n - 30 == 6:
			print(6, 10, 15, n - 31)
		elif n - 30 == 10:
			print(6, 10, 15, n - 31)
		elif n - 30 == 14:
			print(6, 10, 21, n - 37)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')
	t -= 1


def solve(n):
	if n < 30:
		print('NO')
		return
	else:
		nums = [[6, 10, 14], [6, 10, 15], [6, 14, 15], [10, 14, 15]]
		sums = [30, 31, 35, 39]
		for i in range(4):
			x = n - sums[i]
			if x > 0 and x not in nums[i]:
				print('YES')
				for num in nums[i]:
					print(str(num), end=' ')
				print(str(x))
				return
		print('NO')
		return
t = int(input())
for _ in range(t):
	inp = input().split()
	n = int(inp[0])
	solve(n)


t = input()
t = int(t)
while t > 0:
	n = int(input())
	(a, b, c) = (6, 10, 14)
	d = n - 30
	if d <= 0:
		print('NO')
	elif d == 10:
		print('YES')
		print(14, 15, 6, 5)
	elif d == 6:
		print('YES')
		print(5, 6, 10, 15)
	elif d == 14:
		print('YES')
		print(6, 10, 13, 15)
	else:
		print('YES')
		print(a, b, c, d)
	t -= 1


series = [6, 10, 14, 15, 18, 21, 22, 26, 27, 33, 34, 35, 38, 39, 45, 46, 51, 55, 57, 58, 63, 65, 69, 77, 85, 87, 91, 95, 99, 115, 117, 119, 133, 143, 145, 153, 161, 171, 187, 203, 207, 209, 221, 247, 253, 261, 299, 319, 323, 377, 391, 437, 493, 551, 667]
for t in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		n1 = 6
		n2 = 10
		n3 = 14
		i = 3
		n4 = n - (n1 + n2 + n3)
		while i < len(series) and n1 == n4 or n2 == n4 or n3 == n4:
			n3 = series[i]
			n4 = n - (n1 + n2 + n3)
			i += 1
		print('YES')
		print(n1, n2, n3, n4)


t = int(input())
li = [2, 3, 5, 7, 11, 13, 17, 19]
fir = [6, 10]
x = 0
y = 0
for _ in range(t):
	n = int(input())
	if n > 30:
		m = n - (6 + 10)
		j = 0
		flag = False
		while j < len(li) - 2:
			k = j + 1
			while k < len(li) - 1:
				x = li[j] * li[k]
				y = m - x
				if x not in fir and y not in fir and (0 < y != x):
					flag = True
					break
				k += 1
			if flag:
				break
			j += 1
		if flag:
			print('YES')
			print('{} {} {} {}'.format(6, 10, x, y))
		else:
			print('NO')
	else:
		print('NO')


import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		a = 6
		b = 10
		c = 14
		sm = a + b + c
		v = n - sm
		if v == a or v == b or v == c:
			a = 6
			b = 10
			c = 15
		v = n - (a + b + c)
		if n - sm <= 0:
			print('NO')
			continue
		print('YES')
		print(a, b, c, v)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


ans = []
for i in range(10):
	for j in range(10):
		ans.append(str(i) + str(j))
for case in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


ii = lambda : int(input())
for _ in range(ii()):
	n = ii()
	if n > 30:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(2 * 3, 2 * 5, 2 * 7, n - 30)
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	nums = [6, 10, 14, 15]
	nums = [6, 10]
	n -= 16
	if n <= 14:
		print('NO')
	else:
		n -= 14
		if n == 6 or n == 10 or n == 14:
			n -= 1
			nums.append(15)
		else:
			nums.append(14)
		nums.append(n)
		print('YES')
		print(' '.join((str(num) for num in nums)))


t = int(input())
for i in range(t):
	n = int(input())
	a = 14
	b = 6
	c = 10
	if n <= a + b + c:
		print('NO')
	else:
		d = n - a - b - c
		if n == 40 or n == 44:
			a = 6
			b = 14
			c = 15
			d = n - a - b - c
			print('YES')
			print(a, b, c, d)
		elif n == 36:
			a = 6
			b = 10
			c = 15
			d = 5
			print('YES')
			print(a, b, c, d)
		else:
			print('YES')
			print(a, b, c, d)


for _ in range(int(input())):
	n = int(input())
	if n == 36:
		print('Yes')
		print(5, 6, 10, 15)
	elif n == 40:
		print('Yes')
		print(14, 6, 15, 5)
	elif n == 44:
		print('Yes')
		print(6, 7, 10, 21)
	elif n >= 31:
		print('Yes')
		print(6, 10, 14, n - 30)
	else:
		print('No')


primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]
nearest = sorted([i * j for i in primes for j in primes[primes.index(i) + 1:]])
for _ in range(int(input())):
	num = int(input())
	one = nearest[0]
	two = nearest[1]
	three = [i for i in nearest[2:] if i < num - one - two]
	if three == []:
		print('NO')
		continue
	diff = 6
	i = 0
	while diff in nearest:
		diff = num - (one + two + three[i])
		i += 1
	print('YES')
	print(one, two, three[i - 1], diff)


import math

def sieve(n):
	mark = [True] * (n + 1)
	sqrt = int(n ** 0.5) + 1
	for i in range(2, sqrt + 1):
		if mark[i]:
			for j in range(i * i, n + 1, i):
				mark[j] = False
	primes = []
	for i in range(2, n + 1):
		if mark[i]:
			primes.append(i)
	return primes

def main(n):
	if n < 31:
		print('NO')
		return
	cal = n - 6 - 10
	for i in range(int(math.sqrt(n))):
		for j in range(int(math.sqrt(n))):
			if i != j:
				np = s[i] * s[j]
				acal = n - 6 - 10 - np
				if acal > 0 and acal != 6 and (acal != 10) and (np != 6) and (np != 10) and (acal != np):
					print('YES')
					print(6, 10, acal, np)
					return
s = sieve(200001)
for _ in range(int(input())):
	n = int(input())
	main(n)


from math import *
import sys, random
primes = []
nearly = []
MX = int(2 * 10 ** 5 + 5)

def nextInt():
	return int(input())

def nextStrs():
	return input().split()

def nextInts():
	return list(map(int, nextStrs()))

def sieve():
	global MX, primes
	isPrime = [1] * MX
	isPrime[0] = isPrime[1] = 0
	for i in range(4, MX, 2):
		isPrime[i] = 0
	for i in range(1, MX):
		if i * i > MX:
			break
		elif isPrime[i]:
			for j in range(i * i, MX, 2 * i):
				isPrime[j] = 0
	for i in range(2, MX):
		if isPrime[i]:
			primes.append(i)

def main():
	t = nextInt()
	while t > 0:
		n = nextInt()
		if n <= 30:
			print('NO')
		else:
			print('YES')
			print(6, 10, end=' ')
			if n - 30 == 6 or n - 30 == 14 or n - 30 == 10:
				print(15, n - 31)
			else:
				print(14, n - 30)
		t -= 1
exit(main())


from sys import stdin

def main():
	input = stdin.readline
	for t in range(int(input())):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			print('YES')
			c = [2 * 3, 2 * 5, 2 * 7]
			if n - 30 not in c:
				c.append(n - 30)
			else:
				c.pop()
				c.append(15)
				c.append(n - sum(c))
			print(*c)
main()


TC = int(input())
for tc in range(TC):
	N = int(input())
	if N < 31:
		print('NO')
	else:
		r = N - 30
		if r != 6 and r != 10 and (r != 14):
			print('YES')
			print(6, 10, 14, N - 30)
		else:
			r -= 1
			print('YES')
			print(6, 10, 15, N - 31)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		t1 = n - 30
		if t1 != 6 and t1 != 10 and (t1 != 14):
			print(6, 10, 14, t1)
		elif t1 == 6:
			print(10, 15, t1, 5)
		elif t1 == 14:
			print(6, 7, 10, 21)
		elif t1 == 10:
			print(15, 6, 10, 9)


a = int(input(''))
for i in range(0, a):
	i = int(input(''))
	g = i - 31
	h = i - 30
	if i <= 30:
		print('NO')
	elif i == 37 or i == 41 or i == 46 or (i == 31):
		print('YES')
		print(f'6 10 14 {h}')
	else:
		print('YES')
		print(f'6 10 15 {g}')


t = int(input())
for i in range(t):
	x = int(input())
	if 6 + 10 + 14 >= x:
		print('NO')
	elif x - (6 + 10 + 14) == 6 or x - (6 + 10 + 14) == 10 or x - (6 + 10 + 14) == 14:
		print('YES')
		print(6, 10, 15, x - 31)
	else:
		print('YES')
		print(6, 10, 14, x - 30)


for i in range(int(input())):
	N = int(input())
	num = N
	if N == 40:
		print('YES\n', 6, 10, 15, 9)
	elif N == 44:
		print('YES\n', 6, 7, 10, 21)
	elif N == 36:
		print('YES\n', 5, 6, 10, 15)
	elif N > 30:
		print('YES\n', 6, 10, 14, N - 30)
	else:
		print('NO')


n = int(input())
for _ in range(n):
	num = int(input())
	if num <= 30:
		print('NO')
	elif num == 40 or num == 36 or num == 44:
		print('YES')
		a = [6, 15, 14, num - 35]
		print(' '.join(list(map(str, a))))
	else:
		a = [10, 6, 14, num - 30]
		print('YES')
		print(' '.join(list(map(str, a))))


def prime(n):
	a = 6
	b = 10
	c = 14
	d = 15
	if n <= 30:
		print('No')
		return
	xx = n - 30
	if xx == 6 or xx == 10 or xx == 14:
		if a + b + d < n:
			xx = n - (a + b + d)
			print('Yes')
			print('{} {} {} {}'.format(a, b, d, xx))
			return
		else:
			print('NO')
			return
	else:
		print('Yes')
		print('{} {} {} {}'.format(a, b, c, xx))
		return
for i in range(int(input())):
	prime(int(input()))


for t in range(int(input())):
	n = int(input())
	(a, b, c, s) = (6, 10, 14, 30)
	if n - s == 6 or n - s == 10 or n - s == 14:
		c = 15
		s = 31
	if n <= s:
		print('NO')
	else:
		print('YES')
		print(a, b, c, n - s)


t = int(input())
ans = '6 10 14 '
for i in range(t):
	n = int(input())
	if n == 36:
		print('YES')
		print('5 6 10 15')
		continue
	if n == 44:
		print('YES')
		print('6 10 15 13')
		continue
	if n == 40:
		print('YES')
		print('6 10 15 9')
		continue
	if n <= 30:
		print('NO')
	else:
		print('YES')
		print(ans + str(n - 30))


import math

def solve(n):
	ans = []
	for i in range(0, 3):
		ans.append(primes[i])
	i = 2
	if n - sum(ans) < 0:
		print('NO')
	else:
		if n - sum(ans) in ans:
			i += 1
			ans.pop()
			ans.append(primes[i])
		if n - sum(ans) <= 0:
			print('NO')
		else:
			ans.append(n - sum(ans))
			print('YES')
			print(' '.join(map(str, ans)))
t = int(input())
primes = [6, 10, 14, 15, 21, 22, 33]
for _ in range(t):
	n = int(input())
	solve(n)


import sys
for t in range(0, int(sys.stdin.readline())):
	i = int(sys.stdin.readline())
	if i <= 30:
		sys.stdout.write('NO\n')
	else:
		sys.stdout.write('YES\n')
		if i == 36 or i == 40 or i == 44:
			sys.stdout.write('6 10 15 ' + str(i - 31) + '\n')
		else:
			sys.stdout.write('6 10 14 ' + str(i - 30) + '\n')


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	if n < 31:
		cout('no\n')
	elif n == 36:
		cout('yes\n')
		cout('15 10 6 5\n')
	elif n == 40:
		cout('yes\n')
		cout('15 10 6 9\n')
	elif n == 44:
		cout('yes\n')
		cout('15 10 6 13\n')
	else:
		cout('yes\n')
		cout('14 10 6 ')
		cout(str(n - 30) + '\n')


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 40:
			print('15 6 14 {}'.format(n - 15 - 6 - 14))
		elif n == 44:
			print('15 6 10 {}'.format(n - 15 - 6 - 10))
		elif n == 36:
			print('15 10 6 {}'.format(n - 15 - 10 - 6))
		else:
			print('14 10 6 {}'.format(n - 14 - 10 - 6))
main()


CaseNo = int(input())
for x in range(CaseNo):
	Case = int(input())
	if Case > 6 + 10 + 14:
		remainder = Case - 6 - 10 - 14
		print('YES')
		if remainder != 6 and remainder != 10 and (remainder != 14):
			print(6, 10, 14, remainder)
		elif remainder == 6 or remainder == 10 or remainder == 14:
			print(6, 10, 15, Case - 6 - 10 - 15)
	else:
		print('NO')


a = int(input())
for i in range(a):
	s = int(input())
	if s <= 30:
		print('NO')
	else:
		m = s - 30
		if m == 14:
			print('YES')
			print(6, 7, 10, 21)
		elif m == 6:
			print('YES')
			print(5, 6, 10, 15)
		elif m == 10:
			print('YES')
			print(10, 14, 15, 1)
		else:
			print('YES')
			print(6, 10, 14, m)


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		d = 15
		nums = [a, b, c, n - 30]
		if len(set(nums)) == 3:
			print('YES')
			print(a, b, d, n - 31)
		else:
			print('YES')
			print(a, b, c, n - 30)


def a(c):
	if c != 'z':
		return chr(ord(c) + 1)
	else:
		return 'a'

def b(ca):
	ca1 = []
	for i in range(len(ca)):
		ca1.append(a(ca[i]))
	return ca1
n = int(input())
for i in range(n):
	a = int(input())
	if a > 30:
		print('YES')
		if a - 30 == 6:
			print('14 15 1 6')
		elif a - 30 == 10:
			print('6 15 14 5')
		elif a - 30 == 14:
			print('6 15 14 9')
		else:
			print('6 10 14', a - 30)
	else:
		print('NO')


t = int(input())
for aSRD in range(t):
	n = int(input())
	if n > 6 + 10 + 14:
		k = n - 6 - 10 - 14
		print('YES')
		if k == 6 or k == 10 or k == 14:
			print(6, 10, 15, k - 1)
		else:
			print(6, 10, 14, k)
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		r = n - 30
		if r == 6:
			print(6, 10, 15, 5)
		elif r == 10:
			print(6, 10, 15, 9)
		elif r == 14:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, r)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n > 30:
			a = n - 30
			if a == 6:
				print('YES\n5 6 10 15')
			elif a == 10:
				print('YES\n6 14 15 5')
			elif a == 14:
				print('YES\n6 10 15 13')
			else:
				print(f'YES\n6 10 14 {n - 30}')
		else:
			print('NO')
main()


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	n = II()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n in [36, 40, 44]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for _ in range(inin()):
	n = inin()
	if n > 30:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	if N > 30:
		print('YES')
		(Ans1, Ans2) = ([6, 10, 14, N - 30], [6, 10, 15, N - 31])
		if len(set(Ans1)) == 4:
			print(*Ans1)
		else:
			print(*Ans2)
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	if n >= 31:
		a = n - 30
		if a == 6:
			print('YES')
			print('15 10 6', n - (15 + 10 + 6))
		elif a == 10:
			print('YES')
			print('14 15 6', n - (14 + 15 + 6))
		elif a == 14:
			print('YES')
			print('21 10 6', n - (21 + 10 + 6))
		else:
			print('YES')
			print('14 10 6', n - (14 + 10 + 6))
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	a = 6
	b = 10
	c = 14
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		k = n - 30
		if k != a and k != b and (k != c):
			print(str(a) + ' ' + str(b) + ' ' + str(c) + ' ' + str(k))
		else:
			k = k - 1
			print('6 10 15 ' + str(k))


T = int(input())
for t in range(T):
	n = int(input())
	if n > 30:
		r = n - 30
		print('YES')
		if r != 6 and r != 10 and (r != 14):
			print('6 10 14 ' + str(r))
		else:
			r = n - 31
			print('6 10 15 ' + str(r))
	else:
		print('NO')


d = [6, 10, 14]
s = sum(d)
for _ in range(int(input())):
	n = int(input())
	if n <= s:
		print('NO')
		continue
	if n - s in d:
		print('YES')
		print(6, 10, 15, n - (6 + 10 + 15))
		continue
	else:
		print('YES')
		print(6, 10, 14, n - s)


from sys import stdin, stdout
import math
input = stdin.readline

def solve():
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		(a, b, c) = (6, 10, 14)
		d = n - 30
		if d in [a, b, c]:
			c = 15
			d -= 1
		print(a, b, c, d)
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


cases = int(input())
for case in range(cases):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(1, 10, 14, 15)
	elif n == 44:
		print('YES')
		print(6, 10, 13, 15)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


for _ in range(int(input())):
	N = int(input())
	if N > 30:
		print('YES')
		if N == 36:
			print(f'{6} {10} {15} {5}')
		elif N == 40:
			print(f'{6} {14} {15} {5}')
		elif N == 44:
			print(f'{6} {7} {10} {21}')
		else:
			print(f'{6} {10} {14} {N - 30}')
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	if n <= 30:
		print('NO')
	else:
		a = [6, 10, 14]
		s = sum(a)
		for (idx, val) in enumerate(a):
			if n - s == val:
				a[2] = 15
				break
		print('YES')
		print(*a, n - sum(a))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = int(input())
		if n >= 31:
			yield 'YES'
			if n in [36, 40, 44]:
				yield '6 10 15 {}'.format(n - 31)
			else:
				yield '6 10 14 {}'.format(n - 30)
		else:
			yield 'NO'
t = int(input())
ans = gift()
print(*ans, sep='\n')


import sys
q = int(input())
for i in range(q):
	n = int(sys.stdin.readline())
	if n <= 10 + 6 + 14:
		print('NO')
	else:
		print('YES')
		if n - 6 - 10 - 14 == 14:
			print(6, 10, 15, n - 6 - 10 - 15)
		elif n - 6 - 10 - 14 == 10:
			print(6, 10, 15, n - 6 - 10 - 15)
		elif n - 6 - 10 - 14 == 6:
			print(6, 10, 15, n - 6 - 10 - 15)
		else:
			print(6, 10, 14, n - 6 - 10 - 14)


import math

def solve():
	n = int(input())
	sm = 6 + 10 + 14
	sm1 = 6 + 10 + 15
	if n > sm and n - sm != 6 and (n - sm != 10) and (n - sm != 14):
		print('YES')
		print(6, 10, 14, n - sm)
	elif n > sm1 and n - sm1 != 6 and (n - sm1 != 10) and (n - sm1 != 15):
		print('YES')
		print(6, 10, 15, n - sm1)
	else:
		print('NO')
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
for _ in range(t):
	nearly_prime = [6, 10, 14]
	n = int(input())
	k = n - sum(nearly_prime)
	if k < 1:
		print('NO')
	else:
		print('YES')
		if k in nearly_prime:
			k -= 1
			nearly_prime[2] += 1
		print(*nearly_prime, k)


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	(a, b, c) = (6, 10, 14)
	print('YES')
	if n == 36:
		print(5, 6, 10, 15)
	elif n == 44:
		print(6, 7, 10, 21)
	elif n == 40:
		print(3, 6, 10, 21)
	else:
		print(a, b, c, n - (a + b + c))


T = int(input())
for t in range(T):
	a = int(input())
	if a < 31:
		print('NO')
	else:
		print('YES')
		if a - 30 == 6:
			print(6, 10, 15, a - 31)
		elif a - 30 == 10:
			print(6, 10, 15, a - 31)
		elif a - 30 == 14:
			print(6, 10, 15, a - 31)
		else:
			print(6, 10, 14, a - 30)


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	n = ii()
	if n > 30:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(2 * 3, 2 * 5, 2 * 7, n - 30)
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
import heapq as hp
for _ in range(int(ri())):
	n = int(ri())
	summ = 30
	if n <= 30:
		NO()
	else:
		YES()
		if n - 30 == 6:
			print(15, 14, 6, 1)
		elif n - 30 == 10:
			print(15, 14, 6, 5)
		elif n - 30 == 14:
			print(15, 10, 14, 5)
		else:
			print(6, 10, 14, n - 30)


t = int(input())
while t:
	t -= 1
	n = int(input())
	if n in (36, 40, 44):
		j = 1
	else:
		j = 0
	if n > 30:
		print('YES')
		print('6 10', 14 + j, n - 30 - j)
	else:
		print('NO')


def main():
	for i in range(int(input())):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			print('YES')
			if n == 36:
				print('5 6 10 15')
			elif n == 40:
				print('22 10 6 2')
			elif n == 44:
				print('6 7 10 21')
			else:
				print('6 10 14 {}'.format(n - 30))
main()


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
l = [6, 10, 14]
l1 = [6, 10, 15]
s = sum(l)
s1 = sum(l1)
for i in range(int(data())):
	n = int(data())
	if n - s > 0 and n - s not in l:
		out('YES')
		print(*l, n - s)
	elif n - s1 > 0 and n - s1 not in l1:
		out('YES')
		print(*l1, n - s1)
	else:
		out('NO')


t = int(input())
a = []
for i in range(t):
	a.append(int(input()))
for i in range(t):
	if a[i] > 30:
		if a[i] == 36 or a[i] == 40 or a[i] == 44:
			print('YES')
			print('15 10 6', a[i] - 31)
		else:
			print('YES')
			print('14 10 6', a[i] - 30)
	else:
		print('NO')


test_cases = int(input())
for test_case in range(test_cases):
	n = int(input())
	if n > 30:
		x = n - 30
		if x != 6 and x != 10 and (x != 14):
			print('YES')
			print(6, 10, 14, x)
		elif x == 6:
			print('YES')
			print(15, 10, 6, 5)
		elif x == 10:
			print('YES')
			print(15, 10, 6, 9)
		elif x == 14:
			print('YES')
			print(21, 10, 6, 7)
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n == 36:
		print('YES\n5 6 10 15')
	elif n == 40:
		print('Yes\n9 6 10 15')
	elif n == 44:
		print('Yes\n6 10 13 15')
	elif n > 30:
		print('Yes\n6 10 14 ', n - 30)
	else:
		print('No')


import sys, math, bisect
from collections import Counter, defaultdict as dd

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def l():
	return list(sp())

def strl():
	return list(strsp())

def sp():
	return map(int, data().split())

def strsp():
	return map(str, data().split())
for _ in range(int(data())):
	n = int(input())
	a = [6, 10, 14]
	if 30 >= n:
		print('NO')
	else:
		print('YES')
		b = n - 30
		if b in a:
			if b == 6:
				a[2] = 15
				a.append(5)
			elif b == 14:
				a[2] = 21
				a.append(7)
			elif b == 10:
				a[2] = 15
				a.append(9)
		else:
			a.append(b)
		print(*a)


tC = int(input())
for __ in range(tC):
	N = int(input())
	print('NO') if N <= 30 else print('YES\n', 6, 10, 15, N - 31) if N in [36, 40, 44] else print('YES\n', 6, 10, 14, N - 30)


t = int(input())
for x in range(t):
	n = int(input())
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		print('YES')
		if n - 6 - 10 - 14 not in [6, 10, 14]:
			print(6, 10, 14, n - 6 - 10 - 14)
		elif n <= 6 + 10 + 15:
			print('NO')
		else:
			print(6, 10, 15, n - 6 - 10 - 15)


x = int(input())
for i in range(x):
	y = int(input())
	if y <= 30:
		print('NO')
	else:
		a = y - 30
		s = {6, 10, 14, a}
		if len(s) == 4:
			print('YES')
			print('6', '10', '14', a)
		else:
			print('YES')
			print('6', '10', '15', a - 1)


import sys
from collections import Counter

def func(s):
	if s > 30:
		print('YES')
		if s == 36:
			return [5, 6, 10, 15]
		elif s == 40:
			return [6, 10, 15, 9]
		elif s == 44:
			return [6, 10, 15, 13]
		else:
			return [6, 10, 14, s - 30]
	return []
t = int(input())
for i in range(t):
	n = int(input())
	res = func(n)
	if res:
		for i in res:
			print(i, end=' ')
		print()
	else:
		print('NO')


t = int(input())
a = []
for i in range(t):
	a.append(int(input()))
	if a[i] <= 30:
		print('NO')
	elif a[i] - 30 != 6 and a[i] - 30 != 10 and (a[i] - 30 != 14):
		print('YES')
		print('6 10 14 ', end='')
		print(a[i] - 30)
	else:
		print('YES')
		print('6 10 15 ', end='')
		print(a[i] - 31)


res = ''
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		res += 'NO\n'
	elif n == 36:
		res += 'YES\n5 6 10 15\n'
	elif n == 40:
		res += 'YES\n6 9 10 15\n'
	elif n == 44:
		res += 'YES\n6 10 13 15\n'
	else:
		res += 'YES\n6 10 14 %d\n' % abs(n - 30)
print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		arr = []
		if n == 36:
			arr.append(6)
			arr.append(10)
			arr.append(15)
			arr.append(5)
		elif n == 40:
			arr.append(6)
			arr.append(10)
			arr.append(15)
			arr.append(9)
		elif n == 44:
			arr.append(6)
			arr.append(10)
			arr.append(15)
			arr.append(13)
		else:
			arr.append(6)
			arr.append(10)
			arr.append(14)
			arr.append(n - 30)
		for i in range(4):
			print(arr[i], end=' ')
		print('')


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	d = n - 6 - 10 - 14
	if d > 0 and d != 6 and (d != 10) and (d != 14):
		print('YES')
		print(6, 10, 14, d)
	elif d < 0:
		print('NO')
	elif d - 1 > 0:
		print('YES')
		print(6, 10, 15, d - 1)
	else:
		print('NO')


t = int(input())

def cal(l, comp, ind, counta, countb, n):
	if ind == n:
		print(counta, countb)
	if ind == n and counta == countb:
		return True
	elif ind == n:
		return False
	elif l[ind] < comp:
		return cal(l, l[ind], ind + 1, counta + 1, countb, n)
	else:
		return cal(l, l[ind], ind + 1, counta + 1, countb, n) or cal(l, l[ind], ind + 1, counta, countb + 1, n)
for _ in range(t):
	a = int(input())
	num = a - 30
	if a > 30 and num != 14 and (num != 10) and (num != 6):
		print('YES')
		print(14, 10, 6, a - 30)
	elif num == 10:
		print('YES')
		print(14, 15, 6, 5)
	elif num == 14:
		print('YES')
		print(15, 10, 6, 13)
	elif num == 6:
		print('YES')
		print(15, 10, 6, 5)
	else:
		print('NO')


import sys
input = sys.stdin.readline
from math import gcd
t = int(input())
for ccc in range(t):
	x = int(input())
	if x > 6 + 10 + 14:
		print('YES')
		if x - 30 not in [6, 10, 14]:
			print(6, 10, 14, x - 30)
		else:
			print(6, 10, 15, x - 31)
	else:
		print('NO')


x = [6, 10, 14]
T = int(input())
for _ in range(T):
	y = int(input())
	if y >= sum(x) + 1:
		if y - sum(x) in x:
			print('YES')
			print(6, 10, 15, y - sum(x) - 1)
			continue
		else:
			print('YES')
			print(' '.join(map(str, x)), y - sum(x))
			continue
	print('NO')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
for _ in range(stdint()):
	n = stdint()
	if n <= 30:
		print('NO')
	else:
		rem = n - 30
		print('YES')
		if rem == 6:
			print(6, 15, 14, 1)
		elif rem == 10:
			print(10, 14, 15, 1)
		elif rem == 14:
			print(10, 14, 15, 5)
		else:
			print(6, 10, 14, rem)


t = int(input())
while t:
	n = int(input())
	ans = 2 * 3 + 2 * 5 + 2 * 7
	l = []
	if ans >= n:
		print('NO')
	elif n - ans == 6 or n - ans == 10 or n - ans == 14:
		ans1 = 3 * 5 + 2 * 3 + 2 * 5
		if ans1 >= n:
			print('NO')
		else:
			print('YES')
			print(6, 10, 15, n - ans1)
	else:
		print('YES')
		print(6, 10, 14, n - ans)
	t = t - 1


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		ans = [6, 10, 14, n - 6 - 10 - 14]
		ans2 = [6, 10, 15, n - 6 - 10 - 15]
		if len(set(ans)) == 4:
			print(*ans)
		else:
			print(*ans2)


tc = int(input())
for _ in range(tc):
	sayi = int(input())
	if sayi > 30:
		kalan = sayi - 30
		if kalan == 14:
			print('YES')
			print(6, 10, 15, 13)
		elif kalan == 10:
			print('YES')
			print(6, 5, 15, 14)
		elif kalan == 6:
			print('YES')
			print(6, 10, 15, 5)
		else:
			print('YES')
			print(6, 10, 14, kalan)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n > 30:
		print('YES')
		k = n - 30
		if k == 6:
			print('6 14 15 ' + str(n - (6 + 14 + 15)))
		elif k == 10:
			print('6 10 15 ' + str(n - (6 + 10 + 15)))
		elif k == 14:
			print('6 10 15 ' + str(n - (6 + 10 + 15)))
		else:
			print('6 10 14 ' + str(n - (6 + 10 + 14)))
	else:
		print('NO')


tests = int(input())
for _x in range(tests):
	x = int(input())
	if x <= 30:
		print('NO')
	else:
		n = x - 30
		if n == 6 or n == 10 or n == 14:
			print(f'YES\n6 10 15 {n - 1}')
		else:
			print(f'YES\n6 10 14 {n}')


T = int(input())
for _ in range(T):
	num = int(input())
	if num > 30:
		print('YES')
		if num != 36 and num != 40 and (num != 44):
			print(6, 10, 14, num - 30)
		else:
			print(6, 10, 15, num - 31)
	else:
		print('NO')


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	n = int(input())
	s = 6 + 10 + 14
	if n <= s:
		print('NO')
		return
	else:
		print('YES')
		if n == 36:
			print('5 6 10 15')
		elif n == 40:
			print('6 9 10 15')
		elif n == 44:
			print('6 10 13 15')
		else:
			print(6, 10, 14, n - s)
t = int(input())
for i in range(0, t):
	main()


t = int(input())
for ii in range(t):
	n = int(input())
	if n > 30:
		print('YES')
		f = [6, 10, 14]
		last = n - 30
		if last == 6:
			f = [5, 6, 10, 15]
		elif last == 10:
			f = [5, 6, 14, 15]
		elif last == 14:
			f = [6, 7, 10, 21]
		else:
			f.append(last)
		print(*f)
	else:
		print('NO')


s = []
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		s.append('NO')
	elif n - 30 == 6 or n - 30 == 14 or n - 30 == 10:
		s.append('YES')
		s.append(f'6 10 15 {n - 31} ')
	else:
		s.append('YES')
		s.append(f'6 10 14 {n - 30}')
for i in s:
	print(i)


import sys
input = sys.stdin.readline

def inp():
	return int(input())
n = inp()
for _ in range(n):
	i = inp()
	a = 6
	b = 10
	c = 14
	if i <= 30:
		print('NO')
	if i > 30:
		d = i - a - b - c
		print('YES')
		if d in [6, 10, 14]:
			print('{} {} {} {}'.format(6, 10, 15, i - a - b - c - 1))
		else:
			print('{} {} {} {}'.format(6, 10, 14, i - a - b - c))


def process(number):
	if number <= 30:
		return 'NO'
	if number - 30 in [6, 10, 14]:
		return f'YES\n6 10 15 {number - 31}'
	else:
		return f'YES\n6 10 14 {number - 30}'
t = int(input())
for _ in range(t):
	number = int(input())
	print(process(number))


for i in range(int(input())):
	n = int(input())
	if n > 30 and n not in [36, 40, 44]:
		print('YES')
		print(10, 14, 6, n - 30)
	elif n > 30:
		print('YES')
		print(10, 15, 6, n - 31)
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			print('YES')
			last = n - 14 - 10 - 6
			if last != 14 and last != 10 and (last != 6):
				print(6, 10, 14, n - 14 - 10 - 6)
			else:
				print(6, 10, 15, n - 15 - 10 - 6)
main()


for i in range(int(input())):
	p = int(input())
	if p <= 30:
		print('NO')
	else:
		print('YES')
		if p == 36:
			print('{} {} {} {}'.format(5, 6, 10, 15))
		elif p == 40:
			print('{} {} {} {}'.format(3, 6, 10, 21))
		elif p == 44:
			print('{} {} {} {}'.format(6, 7, 10, 21))
		else:
			print('{} {} {} {}'.format(6, 10, 14, p - 30))


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		n = I()
		if n >= 31:
			print('YES')
			if n - 30 == 6:
				print(6, 10, 15, n - 31)
			elif n - 30 == 10:
				print(6, 10, 15, n - 31)
			elif n - 30 == 14:
				print(6, 10, 15, n - 31)
			else:
				print(6, 10, 14, n - 30)
		else:
			print('NO')
main()


def main():
	for _ in range(int(input())):
		x = int(input())
		if x > 30:
			if x == 44 or x == 36 or x == 40:
				print('YES')
				print('6 10 15', x - 31)
			else:
				print('YES')
				print('6 10 14', x - 30)
		else:
			print('NO')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
		continue
	if n == 31:
		print('YES')
		print(14, 10, 6, 1)
		continue
	else:
		print('YES')
		s = [6, 10, 14, 15]
		s1 = 30
		s2 = 31
		if n - s1 not in s:
			print(6, 10, 14, n - s1)
		else:
			print(6, 10, 15, n - s2)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		x = 6
		y = 10
		z = 14
		if n == 35:
			z = 15
		elif n > 35 and n <= 40:
			y = 15
			z = 14
		elif n > 40 and n < 49:
			x = 10
			y = 14
			z = 15
		a = n - (x + y + z)
		print('YES')
		print(x, y, z, a, end=' ')
		print()


def solve(n):
	if n <= 30:
		return []
	l = [6, 10, 14]
	k = n - 30
	if k in l:
		l[2] += 1
		l.append(k - 1)
	else:
		l.append(k)
	return l
t = int(input())
for we in range(t):
	n = int(input())
	l = solve(n)
	if len(l) == 0:
		print('NO')
	else:
		print('YES')
		print(*l)


a = int(input())
while a > 0:
	a -= 1
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(6, 10, 15, n - 31, end=' ')
			print()
		else:
			print(6, 10, 14, n - 30, end=' ')
			print()


for _ in range(int(input())):
	N = int(input())
	v = N - 6 - 10 - 14
	if N == 36:
		print('YES')
		print(10, 15, 6, 5)
	elif N == 40:
		print('YES')
		print(10, 15, 6, 9)
	elif N == 44:
		print('YES')
		print(10, 15, 6, 13)
	elif v > 0:
		print('YES')
		print(6, 10, 14, v)
	else:
		print('NO')


def tryit(n1, n2, n3, n4, s):
	if n4 != n1 and n4 != n2 and (n4 != n3):
		if abs(n4) == n4:
			if n1 + n2 + n3 + n4 == s:
				print(n1, n2, n3, n4)
				return True
	return False
for test in range(int(input())):
	found = False
	num = int(input())
	if num <= 30:
		print('NO')
	else:
		print('YES')
		if tryit(6, 10, 14, num - 30, num):
			pass
		elif tryit(6, 14, 15, num - 35, num):
			pass
		elif tryit(6, 10, 15, num - 31, num):
			pass
		elif tryit(10, 14, 15, num - 39, num):
			pass


def main(args):
	t = int(input())
	for i in range(t):
		n = int(input())
		arr = [6, 10, 14]
		if n > 30:
			print('YES')
			if n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
				print('6 10 14', n - 30)
			else:
				print('6 10 15', n - 31)
		else:
			print('NO')
import sys
sys.exit(main(sys.argv))


f = 30
a = [6, 10, 14]
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 in a:
		aa = a[:]
		aa.remove(14)
		aa.append(15)
		tempf = sum(aa)
		if tempf >= n:
			print('NO')
		else:
			print('YES')
			st = ' '.join([str(x) for x in aa])
			print(st, n - tempf)
	else:
		print('YES')
		print(6, 10, 14, n - f)


t = int(input())
first = 6
second = 10
third = 14
forth = 15
for _ in range(t):
	n = int(input())
	if n > 30 and n - 30 != first and (n - 30 != second) and (n - 30 != third):
		print('YES')
		print(first, second, third, n - 30)
	elif n > 31:
		print('YES')
		print(first, second, forth, n - 31)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	if n == 36:
		print('5 6 10 15')
		continue
	if n == 40:
		print('10 14 15 1')
		continue
	if n == 44:
		print('10 14 15 5')
		continue
	print('6 10 14 ' + str(n - 30))


t = int(input())
for i in range(t):
	n = int(input())
	s = 6 + 14 + 10
	if s < n:
		print('YES')
		if n == 36 or n == 44 or n == 40:
			print(6, 10, 15, n - (6 + 10 + 15))
		else:
			print(6, 10, 14, n - s)
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	x = 30
	if n < 31:
		print('NO')
	else:
		y = n - 30
		if y == 6 or y == 10 or y == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input())
	arr = [6, 10, 14]
	if n <= sum(arr):
		print('NO')
		continue
	print('YES')
	if n == 44 or n == 36 or n == 40:
		arr = [6, 10, 15]
	print(*arr, n - sum(arr))


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
t = int(input())
while t:
	t -= 1
	n = int(input())
	sm = 6 + 10 + 14
	a = [6, 10, 14]
	if n <= sm:
		print('NO')
	else:
		print('YES')
		if n - sm in a:
			print(6, 10, 15, n - sm - 1)
		else:
			print(6, 10, 14, n - sm)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	ans = [6, 10, 14]
	if sum(ans) >= n:
		print('NO')
		continue
	print('YES')
	if n == 36:
		print(6, 10, 15, 5)
		continue
	if n == 40:
		print(6, 9, 10, 15)
		continue
	if n == 44:
		print(6, 10, 13, 15)
		continue
	next = n - sum(ans)
	ans += [next]
	print(*ans)


np = [6, 10, 14, 15, 21, 22, 26]
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		l = []
		count = 0
		while count <= 3:
			if count == 3:
				if n in l:
					n += l.pop()
					n -= np[count]
					l.append(np[count])
					l.append(n)
					count += 1
				else:
					l.append(n)
					count += 1
			else:
				n -= np[count]
				l.append(np[count])
				count += 1
		print('YES')
		for i in l:
			print(i, end=' ')
		print()


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('no')
	elif n >= 45:
		print('yes')
		k = n - 30
		print('%d %d %d %d' % (6, 10, 14, k))
	elif n == 44:
		print('yes')
		print('%d %d %d %d' % (22, 6, 14, 2))
	elif n == 40:
		print('yes')
		print('%d %d %d %d' % (22, 6, 10, 2))
	elif n == 36:
		print('yes')
		print('%d %d %d %d' % (15, 6, 10, 5))
	elif n > 30 and n < 45:
		print('yes')
		k = n - 30
		print('%d %d %d %d' % (6, 10, 14, k))


main = [6, 10, 14]
sec = [6, 10, 15]
for t in range(int(input())):
	n = int(input())
	if n <= 30:
		print('No')
	else:
		if n - sum(main) in main:
			ans = sec + [n - sum(sec)]
		else:
			ans = main + [n - sum(main)]
		print('Yes')
		print(' '.join((str(v) for v in ans)))


t = int(input())
while t > 0:
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		a = [6, 10, 14]
		if n - 30 in a:
			a[2] = 15
			a.append(n - 31)
		else:
			a.append(n - 30)
		a.sort()
		print(' '.join(map(str, a)))
	t = t - 1


nums = [6, 10, 14, 22, 26, 15, 21, 33, 39, 35, 55, 65, 77, 91, 143]
nums.sort()
m = len(nums)
for _ in range(int(input())):
	n = int(input())
	flag = 0
	for i in range(m):
		for j in range(i + 1, m):
			for k in range(j + 1, m):
				t = n - nums[i] - nums[j] - nums[k]
				if t > 0 and t not in [nums[i], nums[j], nums[k]]:
					flag = 1
					print('YES')
					print(nums[i], nums[j], nums[k], t)
					break
			if flag:
				break
		if flag:
			break
	if not flag:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = [6, 10, 14, n - 30]
	if len(set(a)) == 3:
		a[2] += 1
		a[3] -= 1
	if n > 30:
		print('yes')
		print(*a)
	else:
		print('no')


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36 or n == 40 or n == 44:
		print('YES\n6 10 15 ' + str(n - 31))
	else:
		print('YES\n6 10 14 ' + str(n - 30))


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	if n < 31:
		ans.append('NO')
	else:
		ans.append('YES')
		x = n - 30
		if x == 14:
			ans.append((6, 10, 15, x - 1))
		elif x == 10:
			ans.append((6, 10, 15, x - 1))
		elif x == 6:
			ans.append((6, 10, 15, x - 1))
		else:
			ans.append((6, 10, 14, x))
for i in ans:
	if type(i) != str:
		print(*i)
	else:
		print(i)


from math import *
from collections import *
from random import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
p = [2, 3, 5, 7, 11, 13, 17]
su = []
for i in range(7):
	for j in range(i + 1, 7):
		su.append(p[i] * p[j])
while t:
	t -= 1
	n = int(input())
	fl = 0
	x = len(su)
	for i in range(x):
		if fl:
			break
		for j in range(i + 1, x):
			if fl:
				break
			for k in range(j + 1, x):
				z = su[i] + su[j] + su[k]
				if n - z > 0 and n - z not in [su[i], su[j], su[k]]:
					fl = 1
					print('YES')
					print(su[i], su[j], su[k], n - z)
					break
	if fl == 0:
		print('NO')


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	n = inin()
	if n <= 6 + 10 + 14:
		print('No')
		continue
	print('YES')
	if n == 36 or n == 40 or n == 44:
		print(6, 10, 15, n - 31)
	else:
		print(6, 10, 14, n - 30)


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	lcm = x * y // gcd(x, y)
	return lcm

def solution():
	for j in range(Int()):
		n = Int()
		if n <= 30:
			print('NO')
		else:
			print('YES')
			if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
				print(6, 10, 15, n - 31)
			else:
				print(6, 10, 14, n - 30)
solution()


for _ in range(int(input())):
	k = int(input())
	if k <= 30:
		print('NO')
	elif k == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif k == 40:
		print('YES')
		print(6, 15, 14, 5)
	elif k == 44:
		print('YES')
		print(6, 10, 15, 13)
	else:
		print('YES')
		print(k - 30, 6, 10, 14)


import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline
MOD = 1000000007
I = lambda : int(input())
M = lambda : map(int, input().split())
Ms = lambda : map(str, input().split())
ARR = lambda : list(map(int, input().split()))

def main():
	n = I()
	p = [2, 3, 5, 7]
	if n == 36 or n == 40 or n == 44:
		print('YES')
		if n == 36:
			print('6 15 10 5')
		elif n == 40:
			print('6 15 10 9')
		elif n == 44:
			print('6 7 10 21')
	elif n >= 31:
		print('YES')
		print(f'6 10 14 {n - 30}')
	else:
		print('NO')
tc = I()
for _ in range(tc):
	main()


def flint(n):
	if n > 30:
		f = n - 30
		if f not in [6, 10, 14]:
			return ('YES', [6, 10, 14, f])
		else:
			return ('YES', [6, 10, 15, n - 31])
	return ('NO', [])
t = int(input())
for test in range(t):
	n = int(input())
	(ans, lst) = flint(n)
	print(ans)
	if ans == 'YES':
		print(' '.join(list(map(str, lst))))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		n = str(n - 30)
		a = ['6', '10', '14']
		print('YES')
		print(' '.join(a), n) if n not in a else print('6 10 15', int(n) - 1)


t = int(input())
while t:
	t -= 1
	n = int(input())
	m = [6, 10, 14]
	if n - sum(m) <= 0:
		print('NO')
	elif n - sum(m) not in m:
		print('YES')
		print(' '.join(map(str, m + [n - sum(m)])))
	elif n == 36:
		print('YES\n5 6 10 15')
	elif n == 40:
		print('YES\n6 10 15 9')
	else:
		print('YES\n6 10 15 13')


a = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
lst = []
for i in a:
	for j in a:
		if i != j:
			lst.append(i * j)
lst = list(set(lst))
lst.sort()
for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		for i in range(len(lst) - 3):
			if n - sum(lst[i:i + 3]) <= 0:
				if n - sum(lst[i - 1:i + 2]) not in [lst[i - 1], lst[i], lst[i + 1]]:
					print(lst[i - 1], lst[i], lst[i + 1], n - sum(lst[i - 1:i + 2]))
					break
				elif n - lst[i - 1] - lst[i + 2] - lst[i + 1] not in [lst[i - 1], lst[i + 2], lst[i + 1]]:
					print(lst[i - 1], lst[i + 2], lst[i + 1], n - lst[i - 1] - lst[i + 2] - lst[i + 1])
					break
			elif n - sum(lst[i:i + 3]) in lst[i:i + 3]:
				continue
			else:
				print(lst[i], lst[i + 1], lst[i + 2], n - sum(lst[i:i + 3]))
				break


import io
import os
from collections import Counter, defaultdict, deque

def solve(N):
	A = [6, 10, 14, 15]
	for (i, x) in enumerate(A):
		sub = A[:i] + A[i + 1:]
		r = N - sum(sub)
		if r >= 1 and r not in sub:
			return 'YES\n' + ' '.join(map(str, sub + [r]))
	return 'NO'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(N,) = [int(x) for x in input().split()]
	ans = solve(N)
	print(ans)


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	if n <= 30:
		print('NO')
	else:
		c = 0
		s = {6, 10, 14}
		a = n - 30
		if n == 36:
			print('YES')
			print('5 6 10 15')
			return
		if n == 40:
			print('YES')
			print('6 10 15 9')
			return
		if n == 44:
			print('YES')
			print('6 9 14 15')
			return
		print('YES')
		print(6, 10, 14, a)
for _ in range(inp()):
	solve()


t = int(input())
while t > 0:
	n = int(input())
	if n > 30:
		print('YES')
		x = n - 30
		c = 14
		if x == 6 or x == 10 or x == 14:
			x = x - 1
			c = 15
		print('6 10 ' + str(c) + ' ' + str(x))
	else:
		print('NO')
	t -= 1


test = int(input())
for _ in range(test):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		x = n - 30
		if n - 30 == 6:
			print('YES')
			print('6 10 15 %d' % (x - 1))
		elif n - 30 == 10:
			print('YES')
			print('6 15 14 %d' % (x - 5))
		elif n - 30 == 14:
			print('YES')
			print('6 10 15 %d' % (x - 1))
		else:
			print('YES')
			print('6 10 14 %d' % x)


T = int(input())
while T > 0:
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		left = n - 30
		if left == 6:
			temp = [6, 14, 15, 1]
			print(*temp)
		elif left == 10:
			temp = [5, 6, 14, 15]
			print(*temp)
		elif left == 14:
			temp = [5, 10, 14, 15]
			print(*temp)
		else:
			temp = [left, 6, 10, 14]
			print(*temp)
	T -= 1


def solve():
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		s = n - 30
		c = 14
		if s == 6 or s == 10 or s == 14:
			s -= 1
			c += 1
		print('6 10 ' + str(c) + ' ' + str(s))
t = int(input())
for i in range(t):
	solve()


lst = []
for t in range(int(input())):
	n = int(input())
	if n == 44:
		print('YES\n6 7 10 21')
	elif n == 36:
		print('YES\n5 6 10 15')
	elif n == 40:
		print('YES\n2 6 10 22')
	elif n > 30:
		print('YES\n6 10 14 ' + str(n - 30))
	else:
		print('NO')


t = int(input())
for _ in range(t):
	a = int(input())
	if a <= 30:
		print('NO')
	else:
		ans = (6, 10, 14)
		ans2 = (6, 10, 15)
		temp = a - 30
		if temp not in ans:
			print('YES')
			print('6 10 14 ' + str(temp))
		else:
			temp = a - 31
			print('YES')
			print('6 10 15 ' + str(temp))


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	if n > 30:
		if n - 30 == 6:
			print('YES')
			print(6, 10, 15, n - 31)
		elif n - 30 == 10:
			print('YES')
			print(6, 14, 15, n - 35)
		elif n - 30 == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')
testcase(int(inp()))


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		d = 15
		e = n - (a + b + c)
		print('YES')
		set1 = set([a, b, c, e])
		if len(set1) < 4:
			print(a, b, d, n - (a + b + d))
		else:
			print(a, b, c, n - (a + b + c))


import sys, itertools

def eratos(n):
	check = [True] * (n + 1)
	prime = []
	check[0] = check[1] = False
	for i in range(2, int(n ** 0.5) + 1):
		if check[i]:
			j = 2 * i
			while j <= n:
				check[j] = False
				j += i
	for i in range(2, n + 1):
		if check[i]:
			prime.append(i)
	return prime
a = eratos(10)
temp = dict()
for i in a:
	for j in a:
		if i != j and i * j not in temp:
			temp[i * j] = None
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	if n < 31:
		print('NO')
	else:
		can = False
		ans = []
		for i in list(itertools.combinations(temp.keys(), 3)):
			if n - sum(i) not in i and n - sum(i) >= 0:
				ans = list(i)
				ans.append(n - sum(i))
				can = True
				break
		if can:
			print('YES')
			print(' '.join(map(str, ans)))
		else:
			print('NO')


for t in range(int(input())):
	N = int(input())
	K = N - 30
	if N <= 30:
		print('NO')
	else:
		print('YES')
		if K == 6:
			print(5, 6, 10, 15)
		elif K == 10:
			print(10, 15, 14, 1)
		elif K == 14:
			print(6, 10, 7, 21)
		else:
			print(6, 10, 14, K)


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = ii1()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)


def solve(n):
	a = 6
	b = 10
	c = 14
	d = 15
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 9 10 15')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		print(f'6 10 14 {n - 30}')
t = int(input())
for i in range(t):
	n = int(input())
	solve(n)


T = int(input())
for t in range(T):
	n = int(input())
	if n <= 30:
		print('No')
	else:
		print('YES')
		if n - 30 in (6, 10, 14):
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input())
	rem = n - 30
	one = 6
	two = 10
	three = 14
	if rem > 1 and (rem == 6 or rem == 10 or rem == 14):
		three += 1
		rem -= 1
		print('YES')
		print(f'{one} {two} {three} {rem}')
	elif rem >= 1 and rem != 6 and (rem != 10) and (rem != 14):
		print('YES')
		print(f'{one} {two} {three} {rem}')
	else:
		print('NO')


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase

def inp():
	return int(input())

def main():
	testcase = inp()
	for _ in range(testcase):
		n = inp()
		if n <= 30:
			print('NO')
		else:
			d = n - 30
			print('YES')
			if d not in [6, 14, 10]:
				print(6, 10, 14, d)
			else:
				print(6, 10, 15, d - 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	if n > 6 + 10 + 14:
		print('YES')
		r = n - (6 + 10 + 14)
		if r in [6, 10, 14]:
			r = n - (6 + 10 + 15)
			print('{} {} {} {}'.format(6, 10, 15, r))
		else:
			print('{} {} {} {}'.format(6, 10, 14, r))
	else:
		print('NO')


Nu_of_test = int(input())
for i in range(Nu_of_test):
	Z = int(input())
	if Z > 30:
		print('YES')
		n = Z - 30
		if n == 6 or n == 10 or n == 14:
			n = Z - 31
			print('6 10 15', n)
		else:
			print('6 10 14', n)
	else:
		print('NO')


t = int(input())
nums = [6, 10, 14, 15]

def main():
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 == 14 or n - 30 == 10 or n - 30 == 6:
			print(f'6 10 15 {n - 31}')
		else:
			print(f'6 10 14 {n - 30}')
		return
	print('NO')
for _ in range(t):
	main()


t = int(input())
for i in range(t):
	n = int(input())
	if n > 30:
		print('YES')
		if len(set([6, 10, 14, n - 30])) == 3:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	n -= 6
	n -= 10
	n -= 14
	numbers = [6, 10, 14]
	if n <= 0:
		print('No')
	else:
		if n in numbers:
			numbers[-1] += 1
			n -= 1
		numbers.append(n)
		print('Yes')
		print(*numbers)


def main():
	n = int(input())
	a = 6
	b = 10
	c = 14
	if n - (a + b + c) > 0:
		print('YES')
		if n - (a + b + c) == a or n - (a + b + c) == b or n - (a + b + c) == c:
			print(a, b, c + 1, n - (a + b + c + 1))
		else:
			print(a, b, c, n - (a + b + c))
	else:
		print('NO')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
	return
test()


t = int(input())
for h in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	elif n == 36:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, n - 31))
	elif n == 40:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, n - 31))
	elif n == 44:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, n - 31))
	else:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 14, n - 30))


arr = [6, 10, 14]
t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	if n > 30:
		print('YES')
		if n - 30 == 6:
			print(6, 15, 10, 5)
		elif n - 30 == 10:
			print(15, 14, 10, 1)
		elif n - 30 == 14:
			print(15, 14, 10, 5)
		else:
			print(*arr, n - 30)


for _ in range(int(input())):
	N = int(input())
	if N < 31:
		print('NO')
	else:
		print('YES')
		if N - 30 == 14 or N - 30 == 10 or N - 30 == 6:
			print(15, 10, 6, N - 31)
		else:
			print(14, 10, 6, N - 30)


def isPrime(n):
	if n == 2:
		return True
	if n % 2 == 0:
		return False
	r = 3
	while r * r <= n:
		if n % r == 0:
			return False
		r += 2
	return True

def isnearlyPrime(n):
	pfactors = 0
	r = 2
	while r * r <= n:
		if n % r == 0:
			if isPrime(r):
				pfactors += 1
			if n // r != r and isPrime(n // r):
				pfactors += 1
		if pfactors == 2:
			return True
		else:
			pfactors = 0
		r += 1
	return pfactors == 2
t = int(input())
for _ in range(t):
	n = int(input())
	count = 0
	l = []
	diff = 0
	for i in range(2, n):
		if isnearlyPrime(i):
			l.append(i)
			count += 1
		if count == 3:
			diff = n - sum(l)
			if diff in l:
				l.pop()
				count -= 1
			else:
				break
	diff = n - sum(l)
	if count == 3 and diff > 0:
		print('YES')
		print(l[0], l[1], l[2], diff, end=' ')
		print('')
	else:
		print('NO')


try:
	t = int(input())
	for i in range(t):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			a = n - 30
			(c1, c2, c3) = (14, 10, 6)
			if a == c1 or a == c2 or a == c3:
				c1 = 15
				a = n - 31
			print('YES')
			print(c1, c2, c3, a)
except:
	pass


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		l = [6, 10, 14]
		if n - 30 not in l:
			l.append(n - 30)
		else:
			l.remove(14)
			l.append(15)
			l.append(n - 31)
		print(*l)


T = int(input())
for z in range(T):
	n = int(input())
	predict = n - 30
	out = ''
	if n == 44:
		print('YES')
		print(6, 10, 26, 2)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n > 30:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('NO')


from sys import stdin
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
(t,) = gil()
for _ in range(t):
	(n,) = gil()
	vis = [[[6, 10, 14, 0], 30], [[6, 10, 15, 0], 31], [[6, 15, 14, 0], 35], [[15, 10, 14, 0], 39]]
	flag = True
	for (s, d) in vis:
		delta = max(0, n - d)
		if delta not in s:
			flag = False
			print('YES')
			for val in s[:-1]:
				print(val, end=' ')
			print(delta)
			break
	if flag:
		print('NO')


from sys import stdin
tt = int(stdin.readline())
for loop in range(tt):
	n = int(stdin.readline())
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		rem = n - (6 + 10 + 14)
		if rem == 6:
			print('YES')
			print(5, 6, 10, 15)
		elif rem == 10:
			print('YES')
			print(6, 9, 10, 15)
		elif rem == 14:
			print('YES')
			print(6, 10, 13, 15)
		else:
			print('YES')
			print(6, 10, 14, rem)


can = [6, 10, 14]
for _ in range(int(input())):
	num = int(input())
	had = []
	ind = 2
	if sum(can[:3]) < num:
		d = num - sum(can[:3])
		if d != 6 and d != 10 and (d != 14):
			print('YES')
			print(6, 10, 14, d)
		else:
			print('YES')
			print(6, 10, 15, d - 1)
	else:
		print('NO')


import math
from collections import defaultdict

def solve():
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 in [6, 10, 14]:
			print(6, 10, 15, str(n - 31))
		else:
			print(6, 10, 14, str(n - 30))
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


try:
	t = int(input())
	while t:
		n = int(input())
		if n < 31:
			print('NO')
		elif n == 36:
			print('YES')
			print('5 6 10 15')
		elif n == 40:
			print('YES')
			print('6 10 22 2')
		elif n == 44:
			print('YES')
			print('6 7 10 21')
		else:
			print('YES')
			print(f'6 10 14 {n - 30}')
		t = t - 1
except EOFError as e:
	pass


t = int(input())
l36 = [5, 6, 10, 15]
l40 = [6, 14, 15, 5]
l44 = [6, 10, 21, 7]
for i in range(t):
	l = [6, 10, 14]
	n = int(input())
	if n >= 31:
		print('YES')
		if n == 36:
			print(*l36)
		elif n == 40:
			print(*l40)
		elif n == 44:
			print(*l44)
		else:
			l.append(n - 30)
			print(*l)
	else:
		print('NO')


t = int(input())
for test in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	print('YES')
	if n == 36:
		print(6, 10, 15, 5)
	elif n == 40:
		print(6, 15, 14, 5)
	elif n == 44:
		print(6, 10, 15, 13)
	else:
		print(6, 10, 14, n - 30)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		print('YES')
		if n - 6 - 14 - 10 == 6:
			print(6, 15, 10, 5)
		elif n - 6 - 14 - 10 == 10:
			print(6, 15, 10, 9)
		elif n - 6 - 14 - 10 == 14:
			print(6, 15, 10, 13)
		else:
			print(6, 10, 14, n - 6 - 14 - 10)


n = int(input())
for i in range(0, n):
	digit = int(input())
	if digit == 36:
		print('YES')
		print('5 6 10 15')
		continue
	if digit == 44:
		print('YES')
		print('6 7 10 21')
		continue
	if digit == 40:
		print('YES')
		print('6 10 22 2')
		continue
	if digit < 31 or digit in [36, 40, 44]:
		print('NO')
	else:
		ans = '6 10 14 '
		ans += str(digit - 30)
		print('YES')
		print(ans)


import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

def solve(n):
	if n < 31:
		return (False, [])
	elif n == 36:
		return (True, [6, 10, 15, 5])
	elif n == 40:
		return (True, [6, 10, 15, 9])
	elif n == 44:
		return (True, [6, 10, 15, 13])
	else:
		return (True, [6, 10, 14, n - 30])

def main():
	t = int(input())
	arr = []
	for _ in range(t):
		(flag, ans) = solve(int(input()))
		if flag:
			arr.append('YES')
			arr.append(' '.join(list(map(str, ans))))
		else:
			arr.append('NO')
	for a in arr:
		print(a)
main()


import sys, math, collections
from collections import defaultdict

def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')

def get_array():
	l = list(map(int, input().split()))
	return l

def get_2_ints():
	(a, b) = map(int, input().split())
	return (a, b)

def get_3_ints():
	(a, b, c) = map(int, input().split())
	return (a, b, c)

def sod(n):
	(n, c) = (str(n), 0)
	for i in n:
		c += int(i)
	return c

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def getFloor(A, x):
	(left, right) = (0, len(A) - 1)
	floor = -1
	while left <= right:
		mid = (left + right) // 2
		if A[mid] == x:
			return A[mid]
		elif x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			left = mid + 1
	return floor

def main():
	for tt in range(int(input())):
		n = int(input())
		if n == 36:
			print('YES')
			print(5, 6, 10, 15)
			continue
		if n == 40:
			print('YES')
			print(10, 14, 15, 1)
			continue
		if n == 44:
			print('YES')
			print(6, 7, 10, 21)
			continue
		if n <= 30:
			print('NO')
		else:
			print('YES')
			print(6, 10, 14, n - 30)
main()


def Output(n):
	if n < 31:
		print('NO')
	elif n == 36 or n == 40 or n == 44:
		print('YES')
		print('6 10 15 ' + str(n - 31))
	else:
		print('YES')
		k = n - 30
		print('6 10 14 ' + str(k))
Trials = int(input(''))
for i in range(Trials):
	n = int(input(''))
	Output(n)


for _ in range(int(input())):
	num = int(input())
	if num <= 30:
		print('NO')
	elif num not in (36, 40, 44):
		print('YES')
		print(6, 10, 14, num - 30)
	else:
		print('YES')
		print(6, 10, 15, num - 31)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [6, 10, 14]
	a = [6, 10, 15]
	x = n - sum(l)
	m = l.copy()
	if n <= 30:
		print('NO')
	elif x not in l:
		m.append(x)
		print('YES')
		print(*m)
	elif x == 6:
		print('YES')
		a.append(n - sum(a))
		print(*a)
	elif x == 10:
		print('YES')
		a.append(n - sum(a))
		print(*a)
	elif x == 14:
		print('YES')
		a.append(n - sum(a))
		print(*a)


t = int(input())
while t > 0:
	n = int(input())
	w = n - 30
	if n > 30:
		if w == 6 or w == 10 or w == 15:
			print('YES')
			print(f'6 10 15 {w - 1}')
		elif w == 14:
			print('YES')
			print(f'6 10 15 {w - 1}')
		else:
			print('YES')
			print(f'6 10 14 {w}')
	else:
		print('NO')
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	if n > 30:
		a = {6, 10, 14}
		x = 6
		y = 10
		z = 14
		b = n - 30
		if b in a:
			z = 15
			b = n - 6 - 10 - 15
			if b > 0:
				print('YES')
				print(x, y, z, b)
			else:
				print('NO')
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')


t = int(input())
prime_numbers = [2, 3, 5, 7]
nearly_prime = [prime_numbers[i] * prime_numbers[j] for i in range(4) for j in range(i + 1, 4)]

def find_answer(n):
	for i in range(6):
		for j in range(i + 1, 6):
			for z in range(j + 1, 6):
				fourth_number = n - nearly_prime[i] - nearly_prime[j] - nearly_prime[z]
				if fourth_number > 0 and (not fourth_number in [nearly_prime[i], nearly_prime[j], nearly_prime[z]]):
					print('YES')
					print(fourth_number, nearly_prime[i], nearly_prime[j], nearly_prime[z])
					return
	print('NO')
for _ in range(t):
	n = int(input())
	find_answer(n)


import math

def dtb(n):
	return bin(n).replace('0b', '')

def btd(n):
	return int(n, 2)
t = int(input())
for k in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		a = [6, 10, 14]
		if n - 6 - 10 - 14 in a:
			print(6, 10, 15, n - 6 - 10 - 15)
			continue
		print(6, 10, 14, n - 6 - 10 - 14)


t = int(input())
while t != 0:
	n = int(input())
	if n > 30:
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			if n - 30 - 1 != 6 and n - 31 != 10 and (n - 31 != 15):
				print('YES')
				print(6, 15, 10, n - 31)
			elif n - 30 > 9:
				print('YES')
				print(2 * 5, 3 * 5, 2 * 7, n - 39)
			else:
				print('NO')
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')
	t -= 1


n = int(input())
for i in range(0, n):
	m = []
	a = int(input())
	if a <= 30:
		print('NO')
	else:
		p = 6
		q = 10
		r = 14
		k = a - (p + q + r)
		if k == 14 or k == 10 or k == 6:
			print('YES')
			print(p, q, r + 1, a - (p + q + r + 1))
		else:
			print('YES')
			print(p, q, r, a - (p + q + r))


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
input = stdin.readline
letters = ascii_letters[:26]

def prime(x):
	if x <= 1:
		return False
	ind = 2
	while ind * ind <= x:
		if x % ind == 0:
			return False
		ind += 1
	return True
window = []
for i in range(2, 100):
	for g in range(2, i + 1):
		if i % g == 0 and prime(g) and prime(i // g) and (g != i // g):
			window.append(i)
			break
for _ in range(int(input())):
	x = int(input())
	pos = 0
	bf = window[pos:pos + 3]
	if x - sum(bf) in bf:
		bf[-1] = window[3]
	if x - sum(bf) > 0 and x - sum(bf) not in bf:
		print('YES')
		print(*bf + [x - sum(bf)])
	else:
		print('NO')


from collections import Counter
import math
array = [6, 10, 14, 15]
for _ in range(int(input())):
	n = int(input())
	s = 2 * 3 + 2 * 7 + 2 * 5
	if n <= s:
		print('NO')
	elif n - s in [6, 14, 10]:
		s = 6 + 10 + 15
		if n <= s:
			print('NO')
		else:
			print('YES')
			print(6, 10, 15, n - s)
	else:
		print('YES')
		print(6, 14, 10, n - s)


def main():
	for t in range(int(input())):
		n = int(input())
		if n < 31:
			print('NO')
		else:
			print('YES')
			print('6 10', end=' ')
			n = n - 16 - 14
			if n - 6 == 0:
				print('15 5')
			elif n - 10 == 0:
				print('15 9')
			elif n - 14 == 0:
				print('15 13')
			else:
				print('14', end=' ')
				print(n)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	if n <= 30:
		print('NO')
	elif n - 30 != 6 and n - 30 != 10 and (n - 30 != 14):
		print('YES')
		print('6 10 14', n - 30)
	elif n == 36:
		print('YES')
		print('5 6 10 15')
	elif n == 40:
		print('YES')
		print('6 9 10 15')
	elif n == 44:
		print('YES')
		print('6 7 10 21')
	else:
		print('NO')


for __ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	a = 6
	b = 10
	c = 14
	d = 30
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 44:
		print('YES')
		print(6, 7, 10, 21)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	else:
		print('YES')
		print(a, b, c, n - d)


import math

def ans(a):
	for i in range(2, int(math.sqrt(a)) + 1, 1):
		if a % i == 0:
			return False
	return True
t = int(input())
while t > 0:
	a = int(input())
	x = 6
	y = 10
	z = 14
	o = a - 6 - 10 - 14
	if 31 <= a:
		if x == o or o == y or o == z:
			o -= 1
			z += 1
		print('YES')
		print(x, y, z, o)
	else:
		print('NO')
	t -= 1


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
from itertools import accumulate
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	if n < 31:
		print('NO')
	else:
		print('YES')
		temp = n - 30
		if temp not in [6, 10, 14]:
			print(6, 10, 14, temp)
		else:
			print(6, 10, 15, temp - 1)


MIN = 2 * 3 + 2 * 5 + 2 * 7
t = int(input())
for i in range(t):
	n = int(input())
	if n <= MIN:
		print('NO')
	else:
		print('YES')
		if n - MIN in (6, 10, 14):
			print('6 10 15', n - MIN - 1)
		else:
			print('6 10 14', n - MIN)


t = int(input())
for _ in range(t):
	x = int(input())
	if x < 31:
		print('NO')
	else:
		print('YES')
		output = x - 30
		if output != 6 and output != 10 and (output != 14):
			print(6, 10, 14, output)
		else:
			print(6, 10, 15, x - 31)


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('no')
	elif n == 36:
		print('yes\n5 6 10 15')
	elif n == 40:
		print('yes\n6 9 10 15')
	elif n == 44:
		print('yes\n6 10 13 15')
	else:
		print('yes\n6 10 14', str(n - 30))


x = int(input())
for i in range(x):
	y = int(input())
	if y == 36:
		print('Yes')
		print('6 10 15 5')
	elif y == 40:
		print('Yes')
		print('6 10 15 9')
	elif y == 44:
		print('Yes')
		print('6 10 15 13')
	elif y > 30:
		print('YES')
		print('6 10 14 ' + str(y - 30))
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n == 44:
		print('YES\n6 7 10 21')
	elif n in [36, 40]:
		print(f'YES\n6 10 15 {n - 31}')
	elif n > 30:
		print(f'YES\n6 10 14 {n - 30}')
	else:
		print('NO')


for test in range(int(input())):
	n = int(input())
	lt = [6, 10, 14]
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 in lt:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


def solve():
	a = int(input())
	if a < 31:
		print('NO')
	else:
		print('YES')
		val = a - 30
		if val == 14:
			print('6 10 15', val - 1)
		elif val == 10:
			print('6 14 15', val - 5)
		elif val == 6:
			print('6 10 15', val - 1)
		else:
			print('6 14 10', val)
for _ in range(int(input())):
	solve()


T = int(input())
for i in range(T):
	n = int(input())
	x = 6
	y = 10
	z = 14
	cc = x + y + z
	x1 = n - cc
	if x1 <= 0:
		print('NO')
	elif x1 == x:
		x1 -= 1
		z += 1
		print('YES')
		print(x, y, z, x1, sep=' ')
	elif x1 == y:
		x1 -= 1
		z += 1
		print('YES')
		print(x, y, z, x1, sep=' ')
	elif x1 == z:
		print('YES')
		print(6, 7, 10, 21, sep=' ')
	else:
		print('YES')
		print(x, y, z, x1, sep=' ')


t = int(input())
for i in range(t):
	x = int(input())
	if x >= 31:
		print('YES')
		if x == 44 or x == 36 or x == 40:
			p = x - 31
			print('6 10 15', p)
		else:
			p = x - 30
			print('6 10 14', p)
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	if n >= 31:
		print('YES')
		if n == 36:
			print(6, 14, 15, 1)
		elif n == 40:
			print(6, 14, 15, 5)
		elif n == 44:
			print(6, 14, 15, 9)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')
	t -= 1


from __future__ import division, print_function
import os, sys
import math
import collections
from itertools import permutations
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

def primeFactors(n):
	j = []
	while n % 2 == 0:
		j.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			j.append(int(n))
			n = n / i
	if n > 2:
		j.append(int(n))
	return j

def sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def question(a, n):
	j = a
	for i in range(n):
		if a[i] == '1':
			j[i] = '0'
		else:
			j[i] = '1'
	j[0, n - 1].reverse()
	return j

def main():
	for _ in range(ii()):
		n = ii()
		j = [6, 10, 14]
		if n > sum(j):
			if n - sum(j) in j:
				j[2] = 15
			print('YES')
			print(*j, n - sum(j))
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for i in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = [14, 10, 6]
		print('YES')
		if n - 30 not in a:
			print('14 10 6', end=' ')
			print(n - 30)
		elif n - 30 == 14:
			print('6 7 10 21')
		elif n - 30 == 6:
			print('5 15 6 10')
		else:
			print('15 9 10 6')


def f(n):
	if n > 30 and n not in [36, 40, 44]:
		return ['YES', 6, 10, 14, n - 30]
	elif n == 36:
		return ['YES', 5, 6, 10, 15]
	elif n == 40:
		return ['YES', 6, 9, 10, 15]
	elif n == 44:
		return ['YES', 6, 10, 13, 15]
	else:
		return ['NO']
t = int(input())
l = []
for num in range(t):
	m = int(input())
	l.append(m)
for m in l:
	if f(m)[0] == 'YES':
		print('YES')
		print(' '.join(map(str, f(m)[1:])))
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n >= 31 and n - 30 not in [6, 10, 14]:
		print('YES')
		print(*[6, 10, 14, n - 30])
	elif n >= 32 and n - 31 not in [6, 10, 15]:
		print('YES')
		print(*[6, 10, 15, n - 31])
	else:
		print('NO')


t = int(input())
while t:
	x = int(input())
	if x < 31:
		print('NO')
	else:
		x -= 30
		if x == 6 or x == 14 or x == 10:
			x -= 5
			print('YES\n14 15 6 ' + str(x))
		else:
			print('YES\n14 10 6 ' + str(x))
	t -= 1


from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		if N < 31:
			print('NO')
		else:
			print('YES')
			if N == 36:
				print(5, 6, 10, 15)
			elif N == 40:
				print(6, 9, 10, 15)
			elif N == 44:
				print(6, 10, 13, 15)
			else:
				print(6, 10, 14, N - 30)
main()


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print('{0} {1} {2} {3}'.format(6, 10, 15, n - 31))
		else:
			print('{0} {1} {2} {3}'.format(6, 10, 14, n - 30))


n = int(input())
for i in range(n):
	t = int(input())
	s = t - 30
	if t < 31:
		print('NO')
	elif s == 6:
		print('YES')
		print('5 6 10 15')
	elif s == 10:
		print('YES')
		print('6 15 10 9')
	elif s == 14:
		print('YES')
		print('6 7 10 21')
	else:
		print('YES')
		print('6 10 14', s)


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(9, 6, 10, 15)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7

def manipulated_seive(N):
	isprime = [True] * N
	isprime[0] = isprime[1] = False
	prime = []
	ans = []
	SPF = [None] * N
	for i in range(2, N // 2 + 1):
		if isprime[i] == True:
			prime.append(i)
			SPF[i] = i
		j = 0
		while j < len(prime) and i * prime[j] < N and (prime[j] <= SPF[i]):
			isprime[i * prime[j]] = False
			SPF[i * prime[j]] = prime[j]
			j += 1
	return prime
for _ in range(iinput()):
	n = iinput()
	p = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35]
	s = 30
	if n <= 30:
		print('NO')
	else:
		print('YES')
		r = n - 30
		flag = False
		for i in range(10):
			for j in range(i + 1, 10):
				for k in range(j + 1, 10):
					t = n - (p[i] + p[j] + p[k])
					if p[i] != t and p[j] != t and (p[k] != t):
						print(p[i], p[j], p[k], t)
						flag = True
						break
				if flag:
					break
			if flag:
				break


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = [10, 6, 14]
		k = n - 30
		if k in a:
			a[0] = 15
			k -= 5
		print('YES')
		print(*a, k)


def solve():
	n = int(input())
	if n > 30:
		if n - 30 == 14:
			print('YES')
			print(6, 10, 21, 7)
		elif n - 30 == 6:
			print('YES')
			print(6, 10, 15, 5)
		elif n - 30 == 10:
			print('YES')
			print(10, 14, 15, 1)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')
test = int(input())
while test:
	solve()
	test -= 1


t = int(input())
for i in range(t):
	n = int(input())
	if n == 40:
		print('YES')
		print(6, 14, 15, n - 35)
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 44:
		print('YES')
		print(6, 7, 21, 10)
	elif n - 30 <= 0:
		print('NO')
	else:
		print('YES')
		print(6, 10, 14, n - 30)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
pr = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, 17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, 17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, 17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, 17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, 17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, 18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, 18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, 18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, 18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, 18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, 18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, 18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, 18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, 19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, 19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, 19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, 19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, 19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, 19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, 19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, 19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, 20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, 20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, 20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, 20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, 20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, 20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, 21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, 21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, 21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, 21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, 21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, 21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, 21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, 21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, 22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, 22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, 22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, 22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, 22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, 22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, 22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, 23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, 23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, 23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, 23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, 23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, 23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, 23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, 24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, 24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, 24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, 24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, 24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, 24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, 24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, 25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, 25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, 25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, 25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, 25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, 25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, 26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, 26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, 26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, 26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, 26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, 26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, 26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, 26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, 27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, 27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, 27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, 27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, 27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, 27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, 27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, 28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, 28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, 28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, 28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, 28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, 28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, 28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, 28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, 29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, 29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, 29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, 29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, 29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, 29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, 29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, 30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, 30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, 30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, 30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, 30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, 30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, 31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, 31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, 31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, 31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, 31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, 31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, 31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, 32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, 32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, 32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, 32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, 32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, 32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, 32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, 33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, 33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, 33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, 33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, 33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, 33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, 33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, 34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, 34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, 34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, 34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, 34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, 34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, 34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, 35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, 35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, 35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, 35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, 35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, 35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, 35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, 36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, 36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, 36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, 36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, 36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, 36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, 36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, 36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, 37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, 37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, 37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, 37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, 37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, 37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, 37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, 38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, 38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, 38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, 38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, 38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, 38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, 39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, 39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, 39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, 39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, 39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, 39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, 39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, 40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, 40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, 40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, 40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, 40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, 40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, 41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, 41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, 41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, 41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, 41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, 41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, 41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, 42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, 42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, 42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, 42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, 42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, 42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, 42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, 43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, 43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, 43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, 43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, 43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, 43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, 43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, 43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, 44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, 44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, 44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, 44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, 44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, 44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, 44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, 45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, 45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, 45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, 45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, 45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, 45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, 46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, 46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, 46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, 46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, 46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, 46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, 47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, 47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, 47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, 47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, 47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, 47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, 48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, 48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, 48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, 49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, 49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, 49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, 49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, 49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, 49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, 49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, 49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, 49991, 49993, 49999]
pr2 = []
for i in range(len(pr)):
	for j in range(i + 1, len(pr)):
		if pr[i] * pr[j] < 100000:
			pr2.append(pr[i] * pr[j])
		else:
			break
pr2.sort()
t = getInt()
for _ in range(t):
	n = getInt()
	res = False
	for i in range(len(pr2)):
		if pr2[i] >= n:
			break
		for j in range(i + 1, len(pr2)):
			if pr2[j] >= n:
				break
			for k in range(j + 1, len(pr2)):
				m = n - pr2[i] - pr2[j] - pr2[k]
				if m <= 0:
					break
				if m != pr2[i] and m != pr2[j] and (m != pr2[k]):
					print('YES')
					print(pr2[i], pr2[j], pr2[k], m)
					res = True
					break
			if res:
				break
		if res:
			break
	if not res:
		print('NO')


from collections import deque
import sys

def inp():
	return sys.stdin.readline().strip()
pre = [2 * 3, 2 * 5, 2 * 7, 3 * 5, 3 * 7, 2 * 11, 2 * 13, 3 * 11, 2 * 17]
pre.sort()
for _ in range(int(inp())):
	n = int(inp())
	j = 2
	f = 0
	while j < len(pre):
		d = n - pre[j] - pre[0] - pre[1]
		if d <= 0:
			break
		if d != pre[0] and d != pre[1] and (d != pre[j]):
			f = d
			break
		j += 1
	if f == 0:
		print('NO')
	else:
		print('YES')
		print(pre[0], pre[1], pre[j], f)


cases = int(input())
for i in range(cases):
	n1 = n2 = n3 = 0
	n = int(input())
	if n <= 30:
		print('No')
		continue
	if n == 36 or n == 44 or n == 40:
		print('Yes')
		print(6, 10, 15, n - (6 + 10 + 15))
		continue
	else:
		print('Yes')
		print(6, 10, 14, n - (10 + 6 + 14))


t = int(input())
for you in range(t):
	n = int(input())
	if n == 36:
		print('YES')
		print(15, 14, 6, 1)
		continue
	if n == 40:
		print('YES')
		print(1, 10, 14, 15)
		continue
	if n == 44:
		print('YES')
		print(1, 22, 6, 15)
		continue
	if n > 30:
		print('YES')
		print(6, 10, 14, n - 30)
		continue
	print('NO')


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
l = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
ll = []
for i in range(len(l)):
	for j in range(len(l)):
		if i != j:
			ll.append(l[i] * l[j])
ll.sort()
while t:
	n = int(input())
	mi = 6 + 10 + 14 + 15
	less = 6 + 10 + 14
	x = n - less
	lol = 0
	l = [6, 10]
	su = 6 + 10
	curr = 14
	for i in ll:
		if i not in l:
			if n - su - i not in l and n - su - i > 0 and (n - su - i != i):
				l.append(i)
				su += i
				lol = 1
				break
	if lol:
		print('YES')
		print(l[0], l[1], l[2], n - su)
	else:
		print('NO')
	t -= 1


for n in [*open(0)][1:]:
	n = int(n)
	if n < 31:
		print('NO')
	else:
		print('YES')
		rem = n - 30
		arr = [6, 10, 14]
		if any((el == rem for el in arr)):
			arr[2] = 15
			rem -= 1
		arr = map(str, arr + [rem])
		print(' '.join(arr))


for _ in range(int(input())):
	n = int(input())
	l = [6, 10, 14, 15, 21, 33, 35]
	if n <= 30:
		print('NO')
	elif n - 30 > 14:
		print('YES')
		print(6, 10, 14, n - 30)
	else:
		print('YES')
		if n - 30 == 6:
			print(5, 6, 10, 15)
		elif n - 30 == 10:
			print(1, 10, 14, 15)
		elif n - 30 == 14:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


import sys
sys.setrecursionlimit(10000)
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print('5 6 10 15')
		elif n == 40:
			print('6 9 10 15')
		elif n == 44:
			print('6 10 13 15')
		else:
			print('6 10 14', n - 30)


t = int(input())
res = []
for _ in range(t):
	n = int(input())
	if n <= 30:
		res.append('NO')
	else:
		res.append('YES')
		if n - 30 not in [6, 10, 14]:
			res.append('6 10 14 {}'.format(n - 30))
		else:
			res.append('6 10 15 {}'.format(n - 31))
print('\n'.join(res))


n = int(input())
for i in range(n):
	a = 6
	b = 10
	c = 14
	d = 15
	x = int(input())
	if x < 31:
		print('NO')
	else:
		print('YES')
		if x == 36 or x == 40 or x == 44:
			print(a, b, d, x - 31)
		else:
			print(a, b, c, x - 30)


t = int(input())
while t > 0:
	no = int(input())
	if no <= 30:
		print('NO')
		t -= 1
		continue
	if no - 30 not in [6, 10, 14]:
		print('YES')
		print(6, 10, 14, no - 30, end='\n')
	else:
		print('YES')
		print(6, 10, 15, no - 31, end='\n')
	t -= 1


def get_answer(n):
	if n < 31:
		return None
	a = 6
	b = 10
	c = 14
	d = n - (a + b + c)
	if d in (a, b, c):
		c = 15
		d = n - (a + b + c)
	return (a, b, c, d)

def main():
	t = int(input())
	ns = (int(input()) for _ in range(t))
	answers = map(get_answer, ns)
	for answer in answers:
		if answer is not None:
			print('YES')
			print(*answer)
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	m = int(input())
	if m <= 30:
		print('NO')
	else:
		print('YES')
		if m == 36 or m == 40 or m == 44:
			print(6, 10, 15, m - 31, sep=' ')
		else:
			print(6, 10, 14, m - 30, sep=' ')


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(n):
	a = [6, 10, 14]
	s = sum(a)
	if s >= n:
		print('NO')
	else:
		print('YES')
		if n - s in a:
			a[2] = 15
			s = sum(a)
		print(' '.join(map(str, a)), n - s)
for t in range(0, tests):
	n = int(readline())
	solve(n)


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		d = 15
		if n - (a + b + c) == a:
			print('YES')
			print(a, b, d, n - (a + b + d))
		elif n - (a + b + c) == b:
			print('YES')
			print(a, b, d, n - (a + b + d))
		elif n - (a + b + c) == c:
			print('YES')
			print(a, b, d, n - (a + b + d))
		else:
			print('YES')
			print(a, b, c, n - (a + b + c))


t = int(input())
for i in range(t):
	a = 6
	b = 10
	c = 14
	d = 0
	n = int(input())
	if a + b + c >= n:
		print('NO')
	else:
		d = n - a - b - c
		if d == 6:
			c = 15
			d = 5
		elif d == 10:
			c = 15
			d = 9
		elif d == 14:
			c = 15
			d = 13
		print('YES')
		print(a, b, c, d)


def solve():
	n = int(input())
	np = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 in np:
			print(*[6, 10, 15, n - 31])
		else:
			print(*[6, 10, 14, n - 30])
t = int(input())
for _ in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		d = n - 30
		if d == a:
			c = 15
			d -= 1
		elif d == c:
			a = 6
			b = 7
			c = 10
			d = 21
		elif d == b:
			c += 1
			d -= 1
		print('YES')
		print(a, b, c, d)


t_case = int(input())
for _ in range(t_case):
	n = int(input())
	s = [6, 10, 14, 15]
	if n <= 30:
		print('NO')
	elif n > 30:
		print('YES')
		for i in range(4):
			temp = []
			for j in range(4):
				if i != j:
					temp.append(s[j])
			if sum(temp) < n and n - sum(temp) not in temp:
				for i in temp:
					print(i, end=' ')
				print(n - sum(temp))
				break


N = int(input())
for i in range(N):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 not in {6, 10, 14}:
		print('YES\n6 10 14 {}'.format(n - 30))
	else:
		print('YES\n6 10 15 {}'.format(n - 31))


T = int(input())
for _ in range(T):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		np = [6, 10, 14]
		rem = n - 30
		if rem in np:
			print('6 10 15 ' + str(rem - 1))
		else:
			print('6 10 14 ' + str(n - 30))


import math, sys, bisect, heapq
from math import *
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
for _ in range(int(input())):
	N = int(input())
	if N <= 30:
		Y(0)
	else:
		A = [14, 10, 6]
		x1 = 30
		B = [15, 10, 6]
		x2 = 31
		x = N - 30
		f = 0
		if x not in A:
			Y(1)
			print(6, 10, 14, x)
		else:
			y = N - 31
			if y not in B:
				Y(1)
				print(15, 10, 6, y)
			else:
				Y(0)


t = int(input())
for case in range(t):
	n = int(input())
	sm = 6 + 10 + 14
	if n > sm:
		print('YES')
		if n - sm in [6, 10, 14]:
			print(6, 10, 15, n - sm - 1)
		else:
			print(6, 10, 14, n - sm)
	else:
		print('NO')


t = int(input())
nps = [6, 10, 14]
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n - 30 in nps:
			print('6 10 15 {}'.format(n - 31))
		else:
			print('6 10 14 {}'.format(n - 30))


import os
is_dev = 'vscode' in os.environ
if is_dev:
	inF = open('in.txt', 'r')
	outF = open('out.txt', 'w')

def ins(r):
	return list(map(int, r.split(' ')))

def input_():
	if is_dev:
		return inF.readline()[:-1]
	else:
		return input()

def print_(data):
	if is_dev:
		return outF.write(str(data) + '\n')
	else:
		return print(data)
for _ in range(int(input_())):
	n = int(input_())
	if n == 36:
		print_('YES')
		print_('6 10 15 5')
	elif n == 40:
		print_('YES')
		print_('6 14 15 5')
	elif n == 44:
		print_('YES')
		print_('6 10 15 13')
	elif n > 30:
		print_('YES')
		print_(f'6 10 14 {n - 30}')
	else:
		print_('NO')
if is_dev:
	print(open('out.txt', 'r').read() == open('outactual.txt', 'r').read())


from sys import *
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		stdout.write('NO\n')
	else:
		stdout.write('YES\n')
		k = n - 30
		if k in [6, 10, 14]:
			k -= 1
			stdout.write('6 10 15 {}\n'.format(k))
			continue
		stdout.write('6 10 14 {}\n'.format(k))


from sys import stdin, stdout
input = lambda : stdin.readline().rstrip('\r\n')
from collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
INF = float('inf')
power2 = lambda n: n & n - 1 == 0
Testcase = inin()
for Case in range(Testcase):
	n = inin()
	if n > 30:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	n -= 6 + 10 + 14
	if n > 0:
		print('YES')
		if n == 6 or n == 10 or n == 14:
			print(6, 10, 15, n - 1)
		else:
			print(6, 10, 14, n)
	else:
		print('NO')


for _ in range(int(input())):
	q = int(input())
	nono = [6, 14, 10]
	if q > 30:
		print('yes')
		if q - 30 not in nono:
			ans = (6, 10, 14, q - 30)
		elif q == 36:
			ans = (5, 6, 10, 15)
		elif q == 40:
			ans = (9, 6, 10, 15)
		elif q == 44:
			ans = (6, 10, 13, 15)
		print(*ans)
	else:
		print('no')


def solve():
	n = int(input())
	if n >= 31:
		print('YES')
		ans = n - 30
		if ans == 6:
			print('5 6 10 15')
		elif ans == 10:
			print('6 15 14 5')
		elif ans == 14:
			print('7 6 10 21')
		else:
			print('6 10 14 {}'.format(n - 30))
	else:
		print('NO')
t = int(input())
for test in range(t):
	solve()


pos = [6, 10, 14, 15]
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= sum(pos[:3]):
		print('NO')
	else:
		print('YES')
		if n - 30 in pos[:3]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)


def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i += 1
	return True

def nearlyPrime(n):
	prime = []
	nPrime = []
	for i in range(2, n // 2):
		if isPrime(i):
			for j in prime:
				nPrime.append(i * j)
			prime.append(i)
	return nPrime
t = int(input())
l = nearlyPrime(2000)
l.sort()
for _ in range(t):
	n = int(input())
	if n < 30:
		print('NO')
		continue
	splice = l[:3]
	i = 3
	while n - sum(splice) in splice:
		splice[-1] = l[i]
		i += 1
	if n - sum(splice) <= 0:
		print('NO')
		continue
	print('YES')
	for i in splice:
		print(i, end=' ')
	print(n - sum(splice))


import math

def is_prime(n):
	if n == 1:
		return False
	elif n < 4:
		return True
	elif n % 2 == 0:
		return False
	elif n % 3 == 0:
		return False
	elif n < 9:
		return True
	else:
		r = math.floor(math.sqrt(n))
		f = 5
		while f <= r:
			if n % f == 0:
				return False
			if n % (f + 2) == 0:
				return False
			f = f + 6
		return True

def check_nearly_prime(n):
	for i in range(2, math.ceil(math.sqrt(n))):
		if n % i == 0:
			tmp = n // i
			if is_prime(i) == True and is_prime(tmp) == True:
				return True
	return False
for _ in range(int(input())):
	num = int(input())
	a = []
	count = 0
	if num == 44:
		print('YES')
		print('6 10 15 13')
		continue
	if num == 36:
		print('YES')
		print('6 10 15 5')
		continue
	if num == 40:
		print('YES')
		print('6 10 15 9')
		continue
	for i in range(2, num):
		if check_nearly_prime(i) == True:
			a.append(i)
			count += 1
		if count == 3:
			break
	if count == 3:
		if sum(a) >= num:
			print('NO')
		else:
			print('YES')
			a.append(num - sum(a))
			print(*a)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		(a, b, c) = (6, 10, 14)
		arr = [a, b, c]
		n -= sum(arr)
		print('YES')
		if n in arr:
			print(a, b, c + 1, n - 1)
		else:
			print(a, b, c, n)


for _ in [0] * int(input()):
	a = int(input())
	if a in (36, 44, 40):
		print('YES \n6 10 15 {}'.format(str(a - 31)))
		continue
	print('YES \n6 10 14 {}'.format(str(a - 30)) if a > 30 else 'NO')


t = int(input())
for test_case in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print('6 10 15 5')
		elif n == 40:
			print('6 10 15 9')
		elif n == 44:
			print('6 10 15 13')
		else:
			print('6 10 14', n - 6 - 10 - 14)


def cap(n):
	l = [6, 10, 14]
	if n > 30:
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			d = 15
			i = l.index(14)
			l[i] = d
			print('{} {} {} {}'.format(l[0], l[1], l[2], n - 31))
		else:
			print('{} {} {} {}'.format(l[0], l[1], l[2], n - 30))
	else:
		print('NO')
t = int(input())
while t > 0:
	n = int(input())
	cap(n)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 != 6 and n - 30 != 14 and (n - 30 != 10):
			print(2 * 3, 2 * 5, 2 * 7, n - 30)
		else:
			print(2 * 3, 2 * 5, 15, n - 31)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		r = n - 30
		if r == 6 or r == 10 or r == 14:
			print(6, 10, 15, r - 1, sep=' ')
		else:
			print(6, 10, 14, r, sep=' ')


import collections as cc
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	x = 6
	y = 10
	z = 14
	if n < x + y + z + 1:
		print('NO')
	else:
		if n in [36, 40, 44]:
			z = 15
		print('YES')
		print(x, y, z, n - x - y - z)


for i in range(int(input())):
	lista = [6, 10, 14]
	n = int(input())
	if n > 30:
		print('YES')
		if n - 30 in lista:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		a = [6, 10, 14]
		x = n - 30
		if x in a:
			a[2] = 15
			x -= 1
		print(*a, x)


t = int(input())
for i in range(t):
	n = int(input())
	l = [6, 10, 14]
	if n < 30:
		print('NO')
	else:
		d = n - 30
		if d in l:
			l[2] = 15
			d -= 1
		if d <= 0:
			print('NO')
			continue
		print('YES')
		print(l[0], l[1], l[2], d)


t = int(input())
li = [[6, 10, 14], [6, 10, 15], [6, 10, 21], [6, 14, 15], [21, 22, 26], [6, 10, 22], [10, 21, 14]]
for _ in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		for i in li:
			su = sum(i)
			if su < n and n - su not in i:
				print('YES')
				print(*i, n - su)
				break
		else:
			print('NO')


t = int(input())
choose = [14, 15, 17]
while t:
	t -= 1
	n = int(input())
	a = 6
	b = 10
	c = 0
	tem = n - 16
	if n < 31:
		print('NO')
	else:
		i = 0
		while 1:
			c = choose[i]
			tot = n - (a + b + c)
			if tot == a or tot == b or tot == c:
				i += 1
			else:
				break
		print('YES')
		print(a, b, c, n - (a + b + c))


from sys import stdin
input = stdin.readline
import bisect
import math
for xoxo in range(1):
	for _ in range(int(input())):
		n = int(input())
		if n < 31:
			print('NO')
		elif n == 36 or n == 40 or n == 44:
			print('YES\n6 10 15', n - 31)
		else:
			print('YES\n6 10 14', n - 30)


import sys
input = sys.stdin.buffer.readline
from math import *
import os
t = int(input())
while t:
	t -= 1
	n = int(input())
	x = [6, 10, 14]
	if n > 30:
		c = n - 30
		if c in x:
			print('YES')
			print('6 10 15', c - 1)
		else:
			print('YES')
			print('6 10 14', c)
	else:
		print('NO')


for _ in range(int(input())):
	k = int(input())
	(x, y, z) = (6, 10, 14)
	if k <= 30:
		print('NO')
	else:
		(t1, t2) = (k - 30, k - 31)
		if t1 != 6 and t1 != 10 and (t1 != 14):
			print('YES')
			print(6, 10, 14, t1)
		elif t2 != 6 and t2 != 10 and (t2 != 15):
			print('YES')
			print(6, 10, 15, t2)
		else:
			print('NO')


f = lambda : map(int, input().split(' '))
n = int(input())
l = []
m = []
for i in range(n):
	a = int(input())
	if a <= 30:
		print('NO')
	else:
		c = a - 30
		d = [6, 10, 14]
		print('YES')
		if c in d:
			print(6, 10, 15, c - 1)
		else:
			print(6, 10, 14, c)


n = int(input())
for i in range(n):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = 6
		b = 10
		c = 14
		print('YES')
		if n - 30 == 6 or n - 30 == 10 or n - 30 == 14:
			c = 15
		print(a, b, c, n - (a + b + c))


from math import ceil
from sys import stdin, stdout, setrecursionlimit
from random import randint
for _ in range(int(input())):
	n = int(input())
	ans = [6, 10, 14]
	if n <= 30:
		print('NO')
	else:
		if n - 30 in ans:
			ans[2] += 1
			ans.append(n - 31)
		else:
			ans.append(n - 30)
		print('YES')
		print(*ans)


x = int(input())
for i in range(0, x):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		d = n - 30
		print('YES')
		if d == 6:
			print(6, 10, 15, n - 31)
		elif d == 14:
			print(15, 10, 14, n - 39)
		elif d == 10:
			print(6, 15, 14, n - 35)
		else:
			print(6, 10, 14, n - 30)


for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	elif n - 30 not in [6, 10, 14]:
		print(f'YES\n6 10 14 {n - 30}')
	else:
		print(f'YES\n6 10 15 {n - 31}')


II = lambda : input()
JJ = lambda : int(input())
KK = lambda : list(map(int, input().split()))
for _ in range(JJ()):
	n = JJ()
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 40:
		print('YES')
		print(5, 6, 14, 15)
	elif n == 44:
		print('YES')
		print(6, 10, 13, 15)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


import os
import math

def solution():
	t = int(input())
	while t > 0:
		n = int(input())
		if n <= 30:
			print('NO')
		else:
			print('YES')
			x = n - 30
			if x not in (6, 10, 14):
				print(x, 6, 10, 14)
			else:
				x -= 1
				print(x, 6, 10, 15)
		t -= 1
solution()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	n = ii()
	if n <= 30:
		print('NO')
	elif n == 36:
		print('YES')
		print(6, 10, 15, 5)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n == 44:
		print('YES')
		print(6, 10, 15, 13)
	else:
		print('YES')
		print(6, 10, 14, n - 30)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def print_list(l):
	print(' '.join(map(str, l)))
from collections import defaultdict as dc
for _ in range(N()):
	n = N()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, 5)
		elif n == 40:
			print(6, 10, 15, 9)
		elif n == 44:
			print(6, 10, 15, 13)
		else:
			print(6, 10, 14, n - 30)


t = int(input())
c = []
for j in range(t):
	n = int(input())
	if n <= 30:
		c.append('NO')
	elif n == 36:
		c.append('YES')
		c.append(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(5))
	elif n == 40:
		c.append('YES')
		c.append(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(9))
	elif n == 44:
		c.append('YES')
		c.append(str(6) + ' ' + str(10) + ' ' + str(15) + ' ' + str(13))
	else:
		c.append('YES')
		c.append(str(6) + ' ' + str(10) + ' ' + str(14) + ' ' + str(n - 30))
for k in c:
	print(k)


t = int(input())
for _ in range(t):
	n = int(input())
	n = n - 30
	if n <= 0:
		print('NO')
	else:
		print('YES')
		if n == 14 or n == 10 or n == 6:
			print(6, 10, 15, n - 1)
			continue
		print(6, 10, 14, n)


import io
import os
import sys
from collections import deque, defaultdict
from itertools import accumulate
inf = 1 << 65

def _input():
	x = sys.stdin.readline()
	x = x.replace('\r', '')
	x = x.replace('\n', '')
	return x
if 'STDINPUT' not in os.environ:
	input = _input
else:
	print('Standard input')
primes = []
isp = {}
for i in range(2, 2 * 10 ** 5 + 1):
	if i not in isp:
		primes.append(i)
		isp[i] = 1
		for j in range(i + i, 2 * 10 ** 5 + 1, i):
			isp[j] = 1

def solve():
	n = int(input())
	if n <= 6 + 10 + 14:
		print('NO')
	else:
		print('YES')
		if n == 44:
			print('6 7 10 21')
		elif n == 36:
			print('5 6 10 15')
		elif n == 40:
			print('6 10 15 9')
		else:
			print(6, 10, 14, n - 14 - 10 - 6)
test_cases = True
if test_cases:
	_q = int(input())
	for _ in range(_q):
		solve()
else:
	solve()


t = int(input())
for _ in range(t):
	r = int(input())
	if r >= 31:
		print('YES')
		if r - 30 not in [6, 10, 14]:
			print(6, 10, 14, r - 30)
		elif r == 44:
			print(15, 6, 10, 44 - 31)
		elif r == 40:
			print(15, 6, 10, 40 - 31)
		elif r == 36:
			print(15, 6, 10, 5)
	else:
		print('NO')


inp = int(input())
for i in range(inp):
	num = int(input())
	list1 = [6, 10, 14]
	x = num - 30
	if num > 30:
		if num == 36:
			print('YES')
			print(5, 6, 10, 15)
		elif num == 40:
			print('YES')
			print(6, 14, 15, 5)
		elif num == 44:
			print('YES')
			print(6, 10, 7, 21)
		else:
			print('YES')
			print(6, 10, 14, x)
	else:
		print('NO')


t = int(input())
for T in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		l = [6, 10, 14]
		x = n - 30
		if x in l:
			l[2] = 15
			x -= 1
		l.append(x)
		print(*l)


cases = int(input())
for _ in range(cases):
	num = int(input())
	if num <= 30:
		print('NO')
	else:
		print('YES')
		if num == 36:
			print('5 6 10 15')
		elif num == 40:
			print('6 15 14 5')
		elif num == 44:
			print('6 10 15 13')
		else:
			print(f'6 10 14 {num - 30}')


def ip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def lip():
	return list(map(int, input().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst
t = ip()
while t:
	t -= 1
	n = ip()
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(6, 5, 14, 15)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


import sys

def solve(n):
	if n <= 30:
		return None
	if n == 36:
		return (6, 10, 15, 5)
	if n == 40:
		return (6, 14, 15, 5)
	if n == 44:
		return (6, 10, 15, 13)
	return (6, 10, 14, n - 30)
caseCount = int(next(sys.stdin))
for i in range(caseCount):
	n = int(next(sys.stdin))
	x = solve(n)
	if x != None:
		print('YES')
		print(' '.join([str(j) for j in x]))
	else:
		print('NO')


import sys
input = sys.stdin.readline

def main():
	for test_case in range(int(input())):
		n = int(input())
		p = 2 * 3
		q = 2 * 5
		r = 2 * 7
		t = 3 * 5
		arr = [p, q, r]
		s = n - p - q - r
		if n < 31:
			print('NO')
		else:
			print('YES')
			if s not in arr:
				print(p, q, r, s)
			else:
				if s == r:
					print(p, q, t, s - 1)
					continue
				if n == 36:
					print(6, 10, 15, 5)
					continue
				if n == 40:
					print(6, 10, 15, 9)
					continue
	return
main()
pass


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = len(li) - 1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt

def knapsack(li, sumi, s, n, dp):
	if s == sumi // 2:
		return 1
	elif n == 0:
		return 0
	elif dp[n][s] != -1:
		return dp[n][s]
	else:
		if li[n - 1] <= s:
			dp[n][s] = knapsack(li, sumi, s - li[n - 1], n - 1, dp) or knapsack(li, sumi, s, n - 1, dp)
		else:
			dp[n][s] = knapsack(li, sumi, s, n - 1, dp)
		return dp[n][s]
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 44:
			print(6, 14, 22, 2)
		elif n == 40:
			print(6, 10, 22, 2)
		elif n == 36:
			print(6, 15, 10, 5)
		else:
			print(6, 10, 14, n - 30)


from sys import stdout, stdin
(_input, _print) = (stdin.readline, stdout.write)
(_range, _int) = (range, int)

def solution():
	for _ in _range(_int(_input())):
		s = _int(_input())
		if s <= 30:
			print('No')
		else:
			print('Yes')
			if s - 30 == 14 or s - 30 == 10 or s - 30 == 6:
				print(15, 10, 6, s - 31)
			else:
				print(14, 10, 6, s - 30)
solution()


def main():
	test = int(input())
	for _ in range(test):
		t = int(input())
		ans = t - 30
		if ans <= 0:
			print('NO')
		else:
			print('YES')
			if t == 36 or t == 40 or t == 44:
				print(6, 10, 15, ans - 1)
			else:
				print(6, 10, 14, ans)
main()


import sys
input = sys.stdin.buffer.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def prog():
	for _ in range(int(input())):
		n = int(input())
		if n <= 30:
			print('No')
		else:
			print('YES')
			if n == 36:
				sys.stdout.write(f'6 10 15 5\n')
			elif n == 40:
				sys.stdout.write(f'6 10 15 9\n')
			elif n == 44:
				sys.stdout.write(f'6 7 10 21\n')
			else:
				sys.stdout.write(f'6 10 14 {n - 30}\n')
prog()


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		k = n - 30
		print('YES')
		if k == 6 or k == 10 or k == 14:
			print('{} {} {} {}'.format(15, 10, 6, n - 31))
		else:
			print('{} {} {} {}'.format(14, 10, 6, k))


ls = []
t = int(input())
for z in range(t):
	temp = int(input())
	if temp < 31:
		ls.append('NO')
	else:
		s = temp - 30
		st = '14 10 6 '
		if s != 14 and s != 10 and (s != 6):
			ls.append('YES')
			st += str(s)
		elif s == 14:
			st = '15 10 6 '
			s = temp - 31
			ls.append('YES')
			st += str(s)
		elif s == 10:
			st = '15 14 6 '
			s = temp - 35
			ls.append('YES')
			st += str(s)
		else:
			st = '15 10 6 '
			s = temp - 31
			if s > 0:
				ls.append('YES')
				st += str(s)
		ls.append(st)
for i in ls:
	print(i)


import sys
from collections import defaultdict, deque
import math
INF = float('inf')
MOD = 10 ** 9 + 7
read = lambda : [int(s) for s in sys.stdin.readline().split()]
_ = 1
_ = int(input())
nearlyprime = []
for i in [2, 3, 5, 7]:
	for j in [2, 3, 5, 7]:
		if i < j:
			nearlyprime.append(i * j)
while _:
	(n,) = read()
	su = sum(nearlyprime[:3])
	if n <= su:
		print('NO')
	else:
		print('YES')
		if n - su not in nearlyprime[:3]:
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)
	_ -= 1


for t in range(int(input())):
	outs = [6, 10, 14, 15]
	x = int(input())
	if x <= 30:
		print('NO')
	else:
		print('YES')
		if x - 30 in outs:
			outs.pop(2)
			print(outs[0], outs[1], outs[2], x - sum(outs[:3]))
		else:
			print(outs[0], outs[1], outs[2], x - 30)


tot = int(input().strip())
while tot > 0:
	n = int(input().strip())
	if n > 30 and n - 30 not in {6, 10, 14}:
		print('YES')
		print(6, 10, 14, n - 30)
	elif n > 31 and n - 31 not in {6, 10, 15}:
		print('YES')
		print(6, 10, 15, n - 31)
	else:
		print('NO')
	tot -= 1


import math
t = int(input())
rez = []
for i in range(t):
	n = int(input())
	if n < 31:
		rez.append('NO')
	elif n == 36:
		rez.append('YES')
		rez.append('15 10 6 5')
	elif n == 44:
		rez.append('YES')
		rez.append('15 10 6 13')
	elif n == 40:
		rez.append('YES')
		rez.append('15 10 6 9')
	else:
		rez.append('YES')
		p = n - 30
		rez.append('14 10 6 ' + str(p))
for i in range(len(rez)):
	print(rez[i])


a = 30
cases = int(input())
for t in range(cases):
	n = int(input())
	if n > a:
		print('YES')
		if n - a in [6, 10, 14]:
			print(6, 10, 15, n - 31)
		else:
			print(6, 10, 14, n - a)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	elif n in (36, 40, 44):
		extra = n - 6 - 10 - 15
		print('YES')
		print(f'6 10 15 {extra}')
		continue
	else:
		extra = n - 6 - 10 - 14
		print('YES')
		print(f'6 10 14 {extra}')
		continue


for __ in range(int(input())):
	n = int(input())
	if n > 30:
		if n - 30 == 14:
			print('YES')
			print(6, 10, 15, n - 31)
		elif n - 30 == 10:
			print('YES')
			print(6, 14, 15, n - 35)
		elif n - 30 == 6:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('YES')
			print(6, 10, 14, n - 30)
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n - 30 not in (6, 10, 14):
			print(6, 10, 14, n - 30)
		else:
			print(6, 10, 15, n - 31)


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()
c = 6 + 10 + 14
c2 = [6, 10, 14, 15]
for _ in range(INT()):
	n = INT()
	x = n - c
	if x > 0:
		ar = [6, 10, 14]
		if x in ar:
			x -= 1
			if x > 0:
				print('YES')
				print(6, 10, 15, x)
			else:
				print('NO')
		else:
			print('YES')
			print(6, 10, 14, n - c)
	else:
		print('NO')


for s in range(int(input())):
	n = int(input())
	d = n - 6 - 10 - 14
	if d <= 0:
		print('NO')
	elif d == 6:
		if n > 31:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('NO')
	elif d == 10:
		if n > 31:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('NO')
	elif d == 14:
		if n > 31:
			print('YES')
			print(6, 10, 15, n - 31)
		else:
			print('NO')
	else:
		print('YES')
		print(6, 10, 14, n - 30)


t = int(input())
for test in range(t):
	number = int(input())
	if number <= 30:
		print('NO')
	else:
		print('YES')
		remaining = number - 30
		a = 6
		b = 10
		c = 14
		if remaining == a:
			c = 15
			remaining = 5
		if remaining == b:
			c = 15
			remaining = 9
		if remaining == c:
			c = 15
			remaining = 13
		print(a, b, c, remaining)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		g = n - 30
		if g != 6 and g != 10 and (g != 14):
			print('YES')
			print(6, 10, 14, g)
		else:
			print('YES')
			print(6, 10, 15, g - 1)


t = int(input())
for i in range(t):
	n = int(input())
	arr1 = [6, 10, 14]
	arr2 = [6, 10, 15]
	if n > sum(arr1):
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print(arr2[0], arr2[1], arr2[2], n - sum(arr2))
		else:
			print(arr1[0], arr1[1], arr1[2], n - sum(arr1))
	else:
		print('NO')


def main():
	for _ in range(int(input())):
		n = int(input())
		if n > 30:
			if len(set([6, 10, 14, n - 30])) == 4:
				print('YES')
				print(6, 10, 14, n - 6 - 10 - 14)
			else:
				print('YES')
				print(6, 10, 15, n - 6 - 10 - 15)
		else:
			print('NO')
main()


import sys
import math
import heapq

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(6, 10, 15, n - 31)
		elif n == 44:
			print(6, 10, 21, n - 37)
		elif n == 40:
			print(6, 10, 21, n - 37)
		else:
			print(6, 10, 14, n - 30)


def eratosthenes(N):
	from collections import deque
	work = [True] * (N + 1)
	work[0] = False
	work[1] = False
	ret = []
	for i in range(N + 1):
		if work[i]:
			ret.append(i)
			for j in range(2 * i, N + 1, i):
				work[j] = False
	return ret

def main():
	t = int(input())
	A = [int(input()) for _ in range(t)]
	K = 10 ** 5
	Primes = eratosthenes(K)
	N = len(Primes)
	NearPrime = [False] * (K + 1)
	for i in range(N):
		for f in Primes[i + 1:]:
			e = Primes[i]
			if e * f > K:
				break
			NearPrime[e * f] = True
	NearPrimes = []
	for i in range(K + 1):
		if NearPrime[i]:
			NearPrimes.append(i)
	T = set()
	ST = [(0, 0, 0) for _ in range(101)]
	Z = 50
	for n in NearPrimes[:Z]:
		for m in NearPrimes[:Z]:
			if n == m:
				continue
			for k in NearPrimes[:Z]:
				if m == k or k == n:
					continue
				T.add(n + m + k)
				if n + m + k <= 100:
					ST[n + m + k] = (n, m, k)
	S = sorted(list(T))
	Under100 = [False] * 101
	for s in S:
		if s > 100:
			break
		Under100[s] = True
	ANS = []
	no = 'NO'
	yes = 'YES'
	for a in A:
		if a <= 30:
			ANS.append(no)
			continue
		ANS.append(yes)
		ans = 0
		if a <= 100:
			for s in S:
				b = a - s
				(p, q, r) = ST[s]
				if p == b or b == q or b == r:
					continue
				ans = (p, q, r, b)
				break
		else:
			ans = (a - 30, 14, 10, 6)
		ANS.append(' '.join(map(str, ans)))
	print('\n'.join(ANS))
main()


t = int(input())
while t > 0:
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n in [36, 40, 44]:
			l = [6, 10, 15, n - 31]
		else:
			l = [6, 10, 14, n - 30]
		print(l[0], l[1], l[2], l[3])
	t = t - 1


import sys, math, cmath, time
start_time = time.time()

def solve():
	n = inp()
	if n < 31:
		print('NO')
	else:
		if n == 36:
			(a, b, c, d) = (1, 6, 14, 15)
		elif n == 40:
			(a, b, c, d) = (5, 6, 14, 15)
		elif n == 44:
			(a, b, c, d) = (6, 7, 10, 21)
		else:
			(a, b, c, d) = (6, 10, 14, n - 30)
		print('YES')
		print(a, b, c, d)

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n <= 30:
		print('NO')
		continue
	L = []
	for i in range(2, n // 2):
		for j in range(2, i):
			if i % j == 0:
				break
		else:
			L.append(i)
			if len(L) > 1:
				if L[-1] * L[-2] > n:
					break
	flag = 0
	ans = [6, 10]
	for i in L:
		for j in L:
			if i == j:
				continue
			val = i * j
			if val not in ans:
				res = n - 16 - val
				if res > 0 and res != val:
					if n - 16 - val not in ans:
						print('YES')
						print(6, 10, val, res)
						flag = 1
						break
		if flag == 1:
			break


def readn():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readnos():
	return map(int, input().split())
for _ in range(readn()):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		a = n - 30
		if n == 36:
			print('YES')
			print('5 6 10 15')
		elif n == 44:
			print('YES')
			print('6 7 10 21')
		elif n == 40:
			print('YES')
			print('10 14 15 1')
		else:
			print('YES')
			print('6 10 14', a)


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		l = [6, 10, 14]
		if n - 30 == 6:
			print('6 10 15', end=' ')
			print('5')
		elif n - 30 == 10:
			print('6 10 15', end=' ')
			print('9')
		elif n - 30 == 14:
			print('6 10 15', end=' ')
			print('13')
		else:
			print('6 10 14', end=' ')
			print(n - 30)


for _ in range(int(input())):
	n = int(input())
	need1 = n - 6 - 10 - 14
	need2 = n - 6 - 10 - 15
	need3 = n - 6 - 10 - 21
	need4 = n - 6 - 10 - 22
	if need1 > 0 and need1 != 6 and (need1 != 10) and (need1 != 14):
		print('YES')
		print(6, 10, 14, need1)
	elif need2 > 0 and need2 != 6 and (need2 != 10) and (need2 != 15):
		print('YES')
		print(6, 10, 15, need2)
	elif need3 > 0 and need3 != 6 and (need3 != 10) and (need3 != 21):
		print('YES')
		print(6, 10, 21, need3)
	elif need4 > 0 and need4 != 6 and (need4 != 10) and (need4 != 22):
		print('YES')
		print(6, 10, 22, need4)
	else:
		print('NO')


def inpint():
	return int(input())

def inpstr():
	return str(input())

def inparr():
	return list(map(int, input().strip().split()))

def inptup():
	return map(int, input().strip().split())
for _ in range(inpint()):
	n = inpint()
	if n > 30:
		print('YES')
		if n == 36:
			print(6, 10, 5, 15)
		elif n == 40:
			print(10, 14, 15, 1)
		elif n == 44:
			print(10, 14, 15, 5)
		else:
			print(6, 10, 14, n - 30)
	else:
		print('NO')


t = int(input())
Ans = []
for i in range(t):
	n = int(input())
	if n <= 30:
		Ans.append(0)
	elif n == 36:
		Ans.append([6, 10, 15, 5])
	elif n == 40:
		Ans.append([6, 10, 15, 9])
	elif n == 44:
		Ans.append([6, 10, 15, 13])
	else:
		Ans.append(n - 30)
for i in range(len(Ans)):
	if Ans[i] == 0:
		print('NO')
	elif type(Ans[i]) == int:
		print('YES')
		print(6, 10, 14, Ans[i])
	else:
		print('YES')
		print(Ans[i][0], Ans[i][1], Ans[i][2], Ans[i][3])


n = int(input())
for i in range(0, n):
	m = int(input())
	if m <= 6 + 10 + 14:
		print('NO')
	elif m != 36 and m != 40 and (m != 44):
		print('YES')
		print('6 10 14', m - 6 - 10 - 14)
	elif m == 36:
		print('YES')
		print('6 10 15 5')
	elif m == 40:
		print('YES')
		print('5 6 14 15')
	elif m == 44:
		print('YES')
		print('6 10 13 15')


tests = int(input())
nos = [6, 10, 14]
for t in range(tests):
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		r = n - 30
		if r == 6:
			print('YES')
			print('5 6 10 15')
		elif r == 10:
			print('YES')
			print('6 9 10 15')
		elif r == 14:
			print('YES')
			print('6 10 13 15')
		else:
			print('YES')
			print('6 10 14', r)


for _ in range(int(input())):
	n = int(input())
	ans = 1
	l1 = [6, 10, 14]
	l2 = [6, 10, 15]
	k = n - sum(l1)
	if k not in l1:
		l = l1 + [k]
	else:
		k = n - sum(l2)
		l = l2 + [k]
	if k <= 0:
		ans = 0
	if ans:
		print('YES')
		print(*l)
	else:
		print('NO')


t = int(input())
lst1 = []
lst2 = []
for i in range(t):
	lst3 = []
	n = int(input())
	if n < 31:
		lst1.append('NO')
	elif n == 36:
		lst1.append('YES')
		lst2.append(6)
		lst2.append(10)
		lst2.append(15)
		lst2.append(5)
	elif n == 40:
		lst1.append('YES')
		lst2.append(6)
		lst2.append(5)
		lst2.append(14)
		lst2.append(15)
	elif n == 44:
		lst1.append('YES')
		lst2.append(5)
		lst2.append(10)
		lst2.append(14)
		lst2.append(15)
	else:
		lst1.append('YES')
		lst2.append(6)
		lst2.append(10)
		lst2.append(14)
		lst2.append(n - 30)
k = 0
for i in range(t):
	if lst1[i] == 'YES':
		print(lst1[i])
		print(' '.join((str(i) for i in lst2[k:k + 4])))
		k += 4
	else:
		print(lst1[i])


for _ in range(int(input())):
	n = int(input())
	f = n in (36, 40, 44)
	print(*['YES', 'NO', '6 10 {} {}'.format(14 + f, n - 30 - f)][n <= 30::2], sep='\n')


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	n = INT()
	if n == 36:
		print('YES')
		print(5, 6, 10, 15)
	elif n == 44:
		print('YES')
		print(6, 14, 22, 2)
	elif n == 40:
		print('YES')
		print(6, 10, 15, 9)
	elif n > 30:
		print('YES')
		print(6, 10, 14, n - 6 - 10 - 14)
	else:
		print('NO')


for _ in range(int(input())):
	q = int(input())
	if q <= 30:
		print('NO')
	elif q == 36:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, 5))
	elif q == 40:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, 9))
	elif q == 44:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 15, 13))
	else:
		print('YES')
		print('{} {} {} {}'.format(6, 10, 14, q - 30))


for _ in range(int(input())):
	a = int(input())
	if a < 31:
		print('NO')
	else:
		p = []
		p.append(6)
		p.append(14)
		p.append(10)
		if a - 30 in p:
			p.pop(1)
			p.append(15)
			p.append(a - 31)
		else:
			p.append(a - 30)
		print('YES')
		print(*p)


T = int(input())
for t in range(T):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36 or n == 40 or n == 44:
			print('6 10 15', end=' ')
			print(n - 31)
		else:
			print('6 10 14', end=' ')
			print(n - 30)


t = int(input())
for i in range(0, t):
	a = int(input())
	if a > 30 and a != 36 and (a != 40) and (a != 44):
		print('YES')
		print('6', '10', '14', str(a - 30))
	elif a == 36 or a == 40 or a == 44:
		print('YES')
		print('15', '14', '6', str(a - 35))
	else:
		print('NO')


t = int(input())
A = [36, 40, 44]
s = []
for i in range(t):
	n = int(input())
	if n <= 30:
		s.append('NO')
	elif n not in A:
		s.append('YES')
		s.append('6 10 14 ' + str(n - 30))
	else:
		s.append('yes')
		s.append('6 10 15 ' + str(n - 31))
for i in range(len(s)):
	print(s[i])


from math import ceil
for n in range(int(input())):
	x = int(input())
	if x < 31:
		print('NO')
	elif x == 31:
		print('YES')
		print('14 10 6 1')
	else:
		print('YES')
		s = [6, 10, 15, x - 31]
		if x - 31 == 6:
			s[1] = 14
			s[-1] = 2
		elif x - 31 == 10:
			s = [6, 10, 21, 4]
		elif x - 31 == 15:
			s = [6, 10, 21, 9]
		print(*s)


from sys import stdin
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	np1 = [6, 10, 14]
	np2 = [6, 10, 15]
	if n <= 30:
		print('NO')
	elif n - 30 not in np1:
		print('YES')
		print(*np1, n - 30)
	else:
		print('YES')
		print(*np2, n - 31)


T = int(input())
while T > 0:
	n = int(input())
	if n < 31:
		print('NO')
	else:
		nearlyprimes = [6, 10, 14, 15, 21, 35]
		d = -1
		start = 0
		ans = False
		for i in nearlyprimes:
			if ans:
				break
			for j in nearlyprimes:
				if i == j:
					continue
				if ans:
					break
				for k in nearlyprimes:
					if k == i or k == j:
						continue
					if ans:
						break
					d = n - (i + j + k)
					arr = [i, j, k]
					if d not in arr and d > 0:
						print('YES')
						print('{} {} {} {}'.format(i, j, k, d))
						ans = True
		if ans == False:
			print('NO')
	T -= 1


def solve(n):
	if n < 31:
		print('NO')
	else:
		print('YES')
		a = 6
		b = 10
		c = 15
		z = 31
		if n == 36 or n == 44 or n == 40:
			print(a, b, c, n - z)
		else:
			print(a, b, c - 1, n - (z - 1))
for _ in range(int(input())):
	n = int(input())
	solve(n)


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]
num = []
for i in primes:
	for j in primes:
		if i != j and i * j <= 45:
			num.append(i * j)
num = set(num)
num = list(num)
num.sort()
t = ri()
for _ in range(t):
	n = ri()
	if n >= 31:
		if n not in [36, 40, 44]:
			print('YES')
			print(6, 10, 14, n - 30)
		elif n == 36:
			print('YES')
			print(5, 6, 10, 15)
		elif n == 40:
			print('YES')
			print(1, 10, 14, 15)
		elif n == 44:
			print('YES')
			print(6, 7, 10, 21)
	else:
		print('NO')


def solve():
	n = int(input())
	a = 2 * 3
	b = 2 * 5
	c = 2 * 7
	d = n - (a + b + c)
	if d < 1:
		print('NO')
		return
	if d == a or d == b or d == c:
		c += 1
		d -= 1
	print('YES')
	print(a, b, c, d)
for t in range(int(input())):
	solve()


pre = {36: (5, 6, 10, 15), 40: (6, 9, 10, 15), 44: (6, 7, 10, 21)}

def solve():
	a = int(input())
	if a in pre:
		print('YES')
		print(*pre[a])
	elif a > 6 + 10 + 14:
		print('YES')
		print(6, 10, 14, a - 6 - 10 - 14)
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


T = int(input())
while T != 0:
	T -= 1
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		print('YES')
		if n == 36:
			print(5, 6, 10, 15)
		elif n == 40:
			print(1, 10, 14, 15)
		elif n == 44:
			print(6, 7, 10, 21)
		else:
			print(6, 10, 14, n - 30)


import sys

def input():
	return sys.stdin.readline().strip()
t = int(input())
s = 30
while t:
	t -= 1
	n = int(input())
	if n <= s:
		print('NO')
	else:
		print('YES')
		if n - s == 6 or n - s == 10 or n - s == 14:
			print(6, 10, 15, n - s - 1)
		else:
			print(6, 10, 14, n - s)


import sys
t = sys.stdin.readline()
while t:
	t = int(t)
	n = int(input())
	if n <= 30:
		print('NO')
	else:
		x = n - 30
		print('YES')
		if n == 44:
			print('{} {} {} {}'.format(6, 10, 15, 13))
		elif n == 36:
			print('{} {} {} {}'.format(6, 10, 15, 5))
		elif n == 40:
			print('{} {} {} {}'.format(6, 10, 15, 9))
		else:
			print('{} {} {} {}'.format(6, 10, 14, x))
	t -= 1


t = int(input())
for xx in range(0, t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		m = n - 30
		if m != 6 and m != 10 and (m != 14):
			a = [6, 10, 14]
			a.append(n - 30)
			for i in range(0, 4):
				print(a[i], end=' ')
			print()
		if m == 6:
			a = [6, 10, 15]
			a.append(n - 31)
			for i in range(0, 4):
				print(a[i], end=' ')
			print()
		if m == 10:
			a = [6, 14, 15]
			a.append(n - 35)
			for i in range(0, 4):
				print(a[i], end=' ')
			print()
		if m == 14:
			a = [6, 10, 15]
			a.append(n - 31)
			for i in range(0, 4):
				print(a[i], end=' ')
			print()


import sys
input = sys.stdin.readline
t = int(input())
for case in range(t):
	n = int(input())
	if n < 31:
		print('NO')
	else:
		print('YES')
		if n == 36:
			Ans = [6, 10, 15, 5]
		elif n == 40:
			Ans = [6, 10, 15, 9]
		elif n == 44:
			Ans = [6, 10, 15, 13]
		else:
			Ans = [6, 10, 14, n - 30]
		print(*Ans)