Omkar has received a message from Anton saying "Your story for problem A is confusing. Just make a formal statement." Because of this, Omkar gives you an array a = [a_1, a_2, …, a_n] of n distinct integers. An array b = [b_1, b_2, …, b_k] is called nice if for any two distinct elements b_i, b_j of b, |b_i-b_j| appears in b at least once. In addition, all elements in b must be distinct. Can you add several (maybe, 0) integers to a to create a nice array b of size at most 300? If a is already nice, you don't have to add any elements.

For example, array [3, 6, 9] is nice, as |6-3|=|9-6| = 3, which appears in the array, and |9-3| = 6, which appears in the array, while array [4, 2, 0, 6, 9] is not nice, as |9-4| = 5 is not present in the array.

For integers x and y, |x-y| = x-y if x > y and |x-y| = y-x otherwise.

Input

Each test contains multiple test cases. The first line contains t (1 ≤ t ≤ 50), the number of test cases. Description of the test cases follows.

The first line of each test case contains a single integer n (2 ≤ n ≤ 100) — the length of the array a.

The second line of each test case contains n distinct integers a_1, a_2, ⋅⋅⋅, a_n (-100 ≤ a_i ≤ 100) — the elements of the array a.

Output

For each test case, output one line containing YES if Omkar can create a nice array b by adding elements to a and NO otherwise. The case of each letter does not matter, so yEs and nO will also be accepted.

If the first line is YES, output a second line containing a single integer k (n ≤ k ≤ 300). 

Then output one line containing k distinct integers b_1, b_2, ⋅⋅⋅, b_k (-10^9 ≤ b_i ≤ 10^9), the elements of the nice array b. b_1, b_2, ⋅⋅⋅, b_k can be in any order. For each a_i in a, a_i must appear at least once in b.

It can be proved that if Omkar can create such an array b, then he can also do so in a way that satisfies the above constraints.

If multiple solutions exist, you can print any. 

Example

Input


4
3
3 0 9
2
3 4
5
-7 3 13 -2 8
4
4 8 12 6


Output


yes
4
6 0 3 9
yEs
5
5 3 1 2 4
NO
Yes
6
8 12 6 2 4 10

Note

For the first case, you can add integers to a to receive the array b = [6, 0, 3, 9]. Note that |6-3| = |9-6| = |3-0| = 3 and 3 is in b, |6-0| = |9-3| = 6 and 6 is in b, and |9-0| = 9 is in b, so b is nice.

For the second case, you can add integers to a to receive the array b = [5, 3, 1, 2, 4]. We have that |2-1| = |3-2| = |4-3| = |5-4| = 1 is in b, |3-1| = |4-2| = |5-3| = 2 is in b, |4-1| = |5-2| = 3 is in b, and |5-1| = 4 is in b, so b is nice.

For the fourth case, you can add integers to a to receive the array b = [8, 12, 6, 2, 4, 10]. We have that |4-2| = |6-4| = |8-6| = |10-8| = |12-10| = 2 is in b, |6-2| = |8-4| = |10-6| = |12-8| = 4 is in b, |8-2| = |10-4| = |12-6| = 6 is in b, |10-2| = |12-4| = 8 is in b, and |12-2| = 10 is in b, so b is nice.

It can be proven that for all other test cases it is impossible to create a nice array b.

Difficulty: EASY
Tags: Complete search

Constructive algorithms
Skill types: Complete search

Starter code:

Solutions:
from sys import stdin
input = stdin.readline

def solve():
	n = int(input())
	a = [int(x) for x in input().split()]
	for i in a:
		if i < 0:
			print('NO')
			return
	ans = list(range(0, 101))
	print('YES')
	print(len(ans))
	print(*ans)
t = int(input())
for _ in range(t):
	solve()


t = int(input())

def test_case(arr):
	f = 1
	c = 0
	while f != 0:
		f = 0
		for i in range(len(arr)):
			if arr[i] < 0:
				print('NO')
				c = 1
				break
			for j in range(i + 1, len(arr)):
				a = abs(arr[i] - arr[j])
				if a not in arr and len(arr) < 300:
					arr.append(a)
					f = 1
	if len(arr) > 300:
		print('NO')
		c = 1
	if c == 0:
		print('YES')
		print(len(arr))
		print(*arr)
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	test_case(arr)


for _ in range(int(input())):
	n = int(input())
	a = [int(w) for w in input().split()]
	if min(a) < 0:
		print('no')
	else:
		b = [i for i in range(0, max(a) + 1)]
		print('yes')
		print(len(b))
		print(*b)


t = 1
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if a[0] < 0:
		print('NO')
		continue
	print('YES')
	print(101)
	b = [i for i in range(101)]
	print(*b)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = []
	for i in range(101):
		x.append(i)
	for i in range(n):
		if l[i] < 0:
			print('NO')
			break
	else:
		print('YES')
		print(101)
		print(*x)


def sol():
	n = int(input())
	arr = [int(x) for x in input().split()]
	for el in arr:
		if el < 0:
			print('NO')
			return
	print('YES')
	print(101)
	print(*[i for i in range(0, 101)])
	return

def main():
	for i in range(int(input())):
		sol()
main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flg = True
	MAX = 0
	for aa in a:
		if aa < 0:
			flg = False
		else:
			MAX = max(MAX, aa)
	if not flg:
		print('NO')
		continue
	print('YES')
	print(MAX + 1)
	print(*[i for i in range(MAX + 1)])


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	mini = min(arr)
	if mini < 0:
		print('NO')
		continue
	maxi = max(arr)
	x = range(0, maxi + 1)
	print('YES')
	print(maxi + 1)
	print(*x)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	y = 0
	for i in range(n):
		if a[i] < 0:
			y = 1
			break
	if y == 0:
		li = [i for i in range(max(a) + 1)]
		print('YES')
		print(len(li))
		print(*li)
	else:
		print('NO')


for ttt in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	minus = 0
	for i in arr:
		if i < 0:
			minus += 1
	if minus:
		print('no')
	else:
		print('yes')
		print(300)
		res = [i for i in range(300)]
		print(*res)


n = int(input())
ans = []
le = []
aa = []

def nice(a):
	for i in a:
		for j in a:
			if len(a) > 300:
				ans.append('No')
				le.append('')
				aa.append('')
				break
			if abs(i - j) not in a and abs(i - j) != 0:
				a.append(abs(i - j))
			if abs(i - j) == 0 and a.count(i) > 1 and (0 not in a):
				a.append(0)
		if len(a) > 300:
			break
	if len(a) < 300:
		ans.append('Yes')
		le.append(len(a))
		aa.append(a)
for i in range(n):
	a = []
	n1 = int(input())
	a = input().split()
	a = [int(i) for i in a]
	nice(a)
for i in range(n):
	if ans[i] == 'Yes':
		print(ans[i])
		print(le[i])
		print(*aa[i])
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print()
	i = 0
	while i < n:
		j = 0
		while j < n:
			if i == j:
				j += 1
				continue
			if abs(l[i] - l[j]) not in l:
				if n > 300:
					print('NO', end=' ')
					break
				l.append(abs(l[i] - l[j]))
				n += 1
			j += 1
		if n > 300:
			break
		i += 1
	if n <= 300:
		print('YES')
		print(len(l))
		for i in l:
			print(i, end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	mn = min(arr)
	mx = max(arr)
	s = set(arr)
	if len(s) < n:
		print('NO')
	elif mn < 0:
		print('NO')
	elif mn >= 0:
		print('YES')
		lst = [i for i in range(0, 101)]
		print(len(lst))
		print(*lst)
	else:
		print('NO')


import io, os
from collections import Counter
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	a = Counter(list(map(int, input().split())))
	d = {}
	c = list(a.keys())
	b = True
	for i in range(len(c)):
		for j in range(i + 1, len(c)):
			temp = int(abs(c[i] - c[j]))
			if temp == 0:
				b = False
				break
			if temp not in a:
				d[temp] = d.get(temp, 0) + 1
	if b == False:
		print('NO')
	elif len(d) != 0:
		b = True
		while True:
			e = {}
			for x in d:
				a[x] = 1
				for y in a:
					if x != y and abs(int(y - x)) not in a:
						e[abs(int(y - x))] = 1
			if len(a) > 300:
				b = False
				break
			if len(e) == 0:
				break
			d = e
		if not b:
			print('NO')
		else:
			print('YES')
			print(len(a))
			print(*a.keys())
	else:
		print('YES')
		print(len(a))
		print(*a.keys())


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
from itertools import permutations
import heapq
I = sys.stdin.readline
alpha = 'abcdefghijklmnopqrstuvwxyz'

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

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

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

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 isPrime(n):
	if n <= 1:
		return False
	elif n <= 2:
		return True
	else:
		for i in range(2, int(n ** 0.5) + 1):
			if n % i == 0:
				return False
		return True

def main():
	for _ in range(ii()):
		n = ii()
		arr = li()
		f = 1
		for i in arr:
			if i < 0:
				f = 0
				break
		if f:
			ans = [i for i in range(max(arr) + 1)]
			print('YES')
			print(len(ans))
			print(*ans)
		else:
			print('NO')
main()


import math, sys
inp = lambda : int(input())
li = lambda : list(map(int, input().split()))
ma = lambda : map(int, input().split())

def solve():
	n = inp()
	l = li()
	r = []
	r = l
	flag2 = 1
	flag = 0
	count = len(l)
	s = set(l)
	while count < 300:
		i = 0
		while i < len(l) and len(l) < 300:
			for j in range(len(l)):
				if i == j:
					continue
				else:
					q = abs(l[i] - l[j])
					if q not in l:
						flag = 1
						l.append(q)
					else:
						flag = 0
			i += 1
		if flag == 0 and len(l) < 300:
			flag2 = 0
			break
		count = len(l)
	if flag2 == 0:
		print('YES')
		print(len(l))
		return l
	else:
		print('NO')
		return 0
t = int(input())
while t != 0:
	p = solve()
	if p != 0:
		for i in p:
			print(i, end=' ')
		print()
	t -= 1


for t in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	if a[0] < 0:
		print('NO')
	else:
		print('YES')
		print(a[-1] + 1)
		for i in range(a[-1] + 1):
			print(i, end=' ')
		print()


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	flag = True
	for i in range(n):
		if a[i] < 0:
			flag = False
	if flag == False:
		print('NO')
	else:
		m = max(a)
		print('YES')
		print(m + 1)
		for i in range(m + 1):
			print(i, end=' ')
		print()


def solve(lst):
	for i in lst:
		if i < 0:
			print('NO')
			return
	print('YES')
	print(101)
	for x in range(101):
		if x < 100:
			print(x, end=' ')
		else:
			print(x)
	return
t = int(input())
for i in range(t):
	n = int(input())
	lst = map(int, input().split())
	solve(lst)


for _ in range(int(input())):
	n = int(input())
	v = set()
	arr = [int(w) for w in input().split(' ')]
	ans = 'YES'
	test = [-1] + [int(w) for w in range(101)]
	if arr == test:
		print('YES')
	else:
		for item in arr:
			if item < 0:
				ans = 'NO'
				break
		if ans == 'NO':
			print(ans)
		else:
			b = [int(w) for w in range(101)]
			v = [int(w) for w in range(101)]
			print(ans)
			print(101)
			for item in b:
				print(item, end=' ')
			print('')


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial, sqrt
from collections import defaultdict, Counter, OrderedDict, deque
from itertools import combinations, accumulate
from bisect import *
from functools import reduce
from operator import mul
star = lambda x: print(' '.join(map(str, x)))
grid = lambda r: [lint() for i in range(r)]
INF = float('inf')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
import sys
from sys import stdin, stdout
from collections import *
from math import gcd, floor, ceil

def st():
	return list(stdin.readline().strip())

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

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

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

def solve():
	n = inp()
	a = inlt()
	for i in a:
		if i < 0:
			print('NO')
			return
	xx = max(a)
	res = []
	for i in range(0, xx + 1):
		res.append(i)
	print('YES')
	print(xx + 1)
	print(*res)
t = 1
t = inp()
for _ in range(t):
	solve()


def solve(A):
	if not all((a >= 0 for a in A)):
		return (False, None)
	while len(A) < 301:
		D = set()
		for i in range(len(A) - 1):
			for j in range(i + 1, len(A)):
				D.add(A[i] - A[j])
		flag = False
		for d in D:
			if abs(d) in A:
				pass
			else:
				A.append(abs(d))
				flag = True
		if not flag:
			break
	if len(A) <= 300:
		return (True, A)
	return (False, None)
T = int(input())
for _ in range(T):
	n = int(input())
	A = [int(e) for e in input().split(' ')]
	(flag, A) = solve(A)
	if flag:
		print('YES')
		print(len(A))
		print(' '.join((str(e) for e in A)))
	else:
		print('NO')


t = input()
t = int(t)
while t:
	n = int(input())
	l = list(map(int, input().split()))
	d = set(l)
	f = 0
	while True:
		bef = len(d)
		c = 0
		n = len(l)
		for i in range(n):
			for j in range(i + 1, n):
				if abs(l[i] - l[j]) not in d:
					d.add(abs(l[i] - l[j]))
					l.append(abs(l[i] - l[j]))
					c = 1
					break
			if c == 1:
				break
		aft = len(d)
		if bef == aft:
			break
		if len(l) >= 300:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()
	t -= 1


def good(arr):
	if len(set(arr)) != len(arr):
		return False
	nums = set(arr)
	for i in range(len(arr)):
		for j in range(i + 1, len(arr)):
			d = abs(arr[i] - arr[j])
			if d not in nums:
				return False
	return True

def add(arr):
	nums = set(arr)
	vals = set()
	for i in range(len(arr)):
		for j in range(i + 1, len(arr)):
			d = abs(arr[i] - arr[j])
			if d not in nums:
				vals.add(d)
	vals = list(vals)
	arr.extend(vals)

def solve(arr, n, ans):
	found = False
	while len(arr) < 301:
		if good(arr):
			found = True
			break
		add(arr)
	if found:
		ans.append('YES')
		ans.append(str(len(arr)))
		ans.append(' '.join(map(str, arr)))
	else:
		ans.append('NO')

def main():
	t = int(input())
	ans = []
	for i in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		solve(arr, n, ans)
	print('\n'.join(ans))
main()


import os, sys
from io import BytesIO, IOBase
from math import log2, ceil, sqrt
from _collections import deque
import heapq as hp
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')
mod = 10 ** 9 + 7
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = set(a)
	bol = True
	for i in range(n):
		for j in range(i + 1, n):
			if abs(a[i] - a[j]) not in b:
				bol = False
				break
	if not bol:
		if a[0] < 0:
			print('NO')
		else:
			print('YES')
			print(a[-1] + 1)
			for i in range(a[-1] + 1):
				print(i, end=' ')
			print()
	else:
		print('YES')
		print(len(a))
		print(*a)


import math
for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	if l[0] < 0:
		print('NO')
		continue
	print('YES')
	print(300)
	if l[0] == 0:
		print(*list(range(0, 300)))
		continue
	print(*list(range(1, 301)))


t = int(input())
for i in range(t):
	k = int(input())
	arr = input().split(' ')[:k]
	arr = [int(x) for x in arr]
	dic = {}
	checked = {}
	index = 0
	for x in arr:
		dic[x] = 1
		checked[x] = index
		index += 1
	flag = False
	while True:
		flag2 = False
		for fi in arr:
			lt = checked[fi] + 1
			while lt < len(arr):
				if abs(fi - arr[lt]) not in dic:
					dic[abs(fi - arr[lt])] = 1
					checked[abs(fi - arr[lt])] = len(arr)
					arr.append(abs(fi - arr[lt]))
					flag2 = True
					if len(arr) > 300:
						flag = True
						break
				lt += 1
			checked[fi] = len(arr) - 1
			if flag:
				break
		if flag or not flag2:
			break
	if flag:
		print('NO')
	else:
		print('YES')
		print(len(arr))
		arr = [str(x) for x in arr]
		print(' '.join(arr))


for _ in range(int(input())):
	input()
	print('YES\n101\n' + ' '.join([str(x) for x in range(101)]) if min(list(map(int, input().split()))) >= 0 else 'NO')


import math, sys
from itertools import permutations
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
MOD = int(1000000000.0) + 7
INF = float('inf')

def a():
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(n):
		if arr[i] < 0:
			print('NO')
			return
	ans = []
	for i in range(101):
		ans.append(i)
	print('YES')
	print(len(ans))
	print(*ans)

def b():
	n = int(input())
	s = list(input())
	substrings = set()
	for i in range(n):
		sub = ''
		for j in range(i, n):
			sub += s[j]
			substrings.add(sub)
	smallest = 'a'
	while smallest in substrings:
		new = smallest[:-1]
		if ord(smallest[-1]) == 97 + 25:
			new += 'aa'
		else:
			new += chr(ord(smallest[-1]) + 1)
		smallest = new
	print(smallest)

def main():
	ts = 1
	ts = int(input())
	for t in range(1, ts + 1):
		a()

def input():
	return sys.stdin.readline().rstrip('\n').strip()

def print(*args, sep=' ', end='\n'):
	first = True
	for arg in args:
		if not first:
			sys.stdout.write(sep)
		sys.stdout.write(str(arg))
		first = False
	sys.stdout.write(end)
main()


from sys import maxsize, stdout, stdin, stderr
mod = int(1000000000.0 + 7)

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

def lint():
	return [int(x) for x in stdin.readline().split()]

def S():
	return input().strip()

def grid(r, c):
	return [lint() for i in range(r)]
from collections import defaultdict, Counter
import math
import heapq
from heapq import heappop, heappush
import bisect
from itertools import groupby

def gcd(a, b):
	while b:
		a %= b
		tmp = a
		a = b
		b = tmp
	return a

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

def check_prime(n):
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def Bs(a, x):
	i = 0
	j = 0
	left = 0
	right = len(a)
	flag = False
	while left < right:
		mi = (left + right) // 2
		if a[mi] <= x:
			left = mi + 1
			i += 1
		else:
			right = mi
			j += 1
	if left > 0 and a[left - 1] == x:
		return (i - 1, j)
	else:
		return (-1, -1)

def nCr(n, r):
	return fact(n) / (fact(r) * fact(n - r))

def fact(n):
	res = 1
	for i in range(2, n + 1):
		res = res * i
	return res
t = I()
for _ in range(t):
	n = I()
	s = lint()
	d = Counter(s)
	flag = True
	i = 0
	while i < n:
		j = 0
		while j < n:
			tmp = abs(s[i] - s[j])
			if d[tmp] != 1 and i != j:
				s.append(tmp)
				d[tmp] += 1
				n += 1
				if n > 300:
					flag = False
					break
			j += 1
		if n > 300:
			flag = False
			break
		i += 1
	if flag:
		print('YES')
		print(n)
		print(*s)
	else:
		print('NO')


def solve():
	n = int(input())
	a = [int(i) for i in input().split()]
	for elem in a:
		if elem < 0:
			print('No')
			return
	print('Yes')
	print(101)
	print(*list(range(101)))
	return
for t in range(int(input())):
	solve()


t = int(input())
while t != 0:
	n = int(input())
	arr = [int(k) for k in input().split()]
	if min(arr) < 0:
		print('No')
	else:
		print('Yes')
		print(101)
		for i in range(101):
			print(i, end=' ')
		print()
	t -= 1


for _ in range(int(input())):
	n = int(input())
	arrA = list(map(int, input().split()))
	val = True
	arrA.sort(reverse=True)
	arrB = arrA
	for i in arrB:
		for j in arrA:
			if i != j:
				if abs(i - j) not in arrB:
					arrB.append(abs(i - j))
				if len(arrB) > 300:
					print('NO')
					val = False
					break
		if val == False:
			break
	if val == True:
		print('YES')
		print(len(arrB))
		print(*arrB)


def solve(l, n):
	found = False
	for i in l:
		if i < 0:
			print('NO')
			found = True
			break
	if not found:
		print('YES')
		print(101)
		for i in range(0, 101):
			print(i, end=' ')
	return
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	solve(l, n)


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

def sol():
	input()
	A = list(putin())
	for elem in A:
		if elem < 0:
			print('NO')
			return
	print('YES')
	print(101)
	print(*list(range(101)))
for iter in range(int(input())):
	sol()


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	pos = False
	neg = False
	mn = 101
	mx = -101
	for i in a:
		mn = min(mn, i)
		mx = max(mx, i)
	if mn < 0:
		print('NO')
	else:
		print('YES')
		mn = 0
		mx = 100
		print(101)
		for i in range(mn, mx + 1):
			print(i, end=' ')
		print()
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


from sys import stdin
from math import inf

def gcd(a, b):
	if b:
		return gcd(b, a % b)
	else:
		return a
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	for ele in a:
		if ele < 0:
			print('NO')
			break
	else:
		print('YES')
		print(101)
		print(' '.join([str(i) for i in range(101)]))


test = int(input())
for _ in range(test):
	n = int(input())
	list1 = list(map(int, input().split()))
	max1 = -200
	min1 = 200
	b = 0
	for i in range(len(list1)):
		min1 = min(min1, list1[i])
		max1 = max(max1, list1[i])
		if list1[i] < 0:
			b = 1
	list2 = []
	if b == 0:
		print('YES')
		print(max1 + 1)
		for i in range(max1 + 1):
			list2.append(i)
		print(*list2)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	lst = [int(x) for x in input().split()]
	if min(lst) < 0:
		print('NO')
	else:
		print('YES')
		print(300)
		for q in range(0, 300):
			print(q, end=' ')


cases = int(input())
for k in range(cases):
	n = int(input())
	a = list(map(int, input().split()))
	x = min(a)
	y = max(a)
	if x < 0:
		print('NO')
	else:
		print('YES')
		print(y + 1)
		for i in range(0, y + 1):
			print(i, sep=' ', end=' ')


for _ in range(int(input())):
	x = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if l[0] < 0:
		print('NO')
	else:
		print('YES')
		print(102)
		a = [i for i in range(102)]
		print(*a)


import math
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if a[0] < 0:
		print('NO')
	else:
		print('YES')
		print(101)
		for i in range(101):
			print(i, end=' ')
		print()


for _ in range(int(input())):
	n = int(input())
	x = [int(x) for x in input().split()]
	negative = False
	for i in range(0, n):
		if x[i] < 0:
			negative = True
			break
	if negative == True:
		print('NO')
	else:
		print('YES')
		print(101)
		for i in range(0, 101):
			print(i, end=' ')
		print('')


import sys
from os import path
import math
import time
from collections import defaultdict
from sys import setrecursionlimit
setrecursionlimit(10 ** 8)
MOD = 10 ** 9 + 7
INT_MAX = 10 ** 9
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def check_train(t_arr, x):
	(flag1, flag2) = (0, 0)
	(dist1, dist2) = (INT_MAX, INT_MAX)
	for j in range(1, x):
		if t_arr[x - 1 - j] == 1 and flag1 == 0:
			dist1 = x - (x - j)
			flag1 = 1
		if len(t_arr) > x - 1 + j and t_arr[x - 1 + j] == 2 and (flag2 == 0):
			dist2 = j
			flag2 = 1
	if dist1 < dist2:
		return dist1
	elif dist2 == INT_MAX and dist1 == INT_MAX:
		return -1
	else:
		return dist2

def compute(arr):
	count = 1
	temp_arr = []
	flag = 0
	for i in range(len(arr)):
		if arr[i] == 1:
			count = 1
			flag = 1
			temp_arr.append(0)
		elif flag == 1:
			temp_arr.append(count)
			count += 1
		else:
			temp_arr.append(0)
	count = 1
	flag = 0
	for j in range(len(arr) - 1, -1, -1):
		if arr[j] == 2:
			count = 1
			flag = 1
		elif flag == 1:
			temp_arr[j] = min(temp_arr[j], count)
			count += 1
	return temp_arr

def test_case():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		arr = sorted(arr)
		diff = abs(arr[0] - arr[1])
		flag = 0
		for i in range(n):
			if arr[i] < 0:
				flag = 1
				break
			if arr[i] % diff != 0:
				flag = 2
		if flag == 0:
			print('YES')
			t = diff
			max_ = arr[-1]
			while t <= max_:
				if t not in arr:
					arr.append(t)
				t += diff
			print(len(arr))
			for i in range(len(arr)):
				print(arr[i], end=' ')
			print()
		elif flag == 2:
			print('YES')
			t = 1
			max_ = arr[-1]
			while t <= max_:
				if t not in arr:
					arr.append(t)
				t += 1
			print(len(arr))
			for i in range(len(arr)):
				print(arr[i], end=' ')
			print()
		else:
			print('NO')
test_case()


from collections import Counter
for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	fl = 0
	for k in l:
		if k < 0:
			print('No')
			fl = 1
			break
	if fl == 1:
		continue
	d = Counter(l)
	si = len(l)
	a = 0
	b = 1
	flag = 0
	while a < si:
		while b < si:
			if b == a:
				break
			elif d[abs(l[a] - l[b])] == 0:
				flag = 1
				d[abs(l[a] - l[b])] += 1
				l.append(abs(l[a] - l[b]))
				si += 1
			b += 1
		a += 1
		b = 0
	print('Yes')
	print(len(l))
	print(*l)


t = int(input())
for k in range(0, t):
	x = int(input())
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	for i in range(len(a)):
		if a[i] < 0:
			print('NO')
			c = 1
			break
	if c == 0:
		print('YES')
		print(a[len(a) - 1] + 1)
		for i in range(a[len(a) - 1] + 1):
			print(i, end=' ')
		print()


from math import sqrt, ceil, floor
import sys
from collections import Counter
from collections import defaultdict as dd
t = int(input())
for tt in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if min(arr) < 0:
		print('NO')
	else:
		print('YES')
		print(101)
		print(*list(range(101)))


T = int(input())
for __ in range(T):
	n = int(input())
	listi = list(map(int, input().split()))
	listi.sort()
	if listi[0] < 0:
		print('NO')
		continue
	ans = []
	for i in range(0, listi[-1] + 1):
		ans.append(i)
	print('YES')
	print(len(ans))
	print(*ans, sep=' ')


from math import gcd
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if min(a) < 0:
		print('NO')
	else:
		gc = abs(a[1] - a[0])
		for i in range(1, n - 1):
			gc = gcd(gc, abs(a[i + 1] - a[i]))
		if gc in a:
			res = []
			i = gc
			while i <= max(a):
				res.append(i)
				i += gc
		else:
			res = [i for i in range(1, max(a) + 1)]
		res += [0] * a.count(0)
		if len(res) > 300:
			print('NO')
		else:
			print('YES')
			print(len(res))
			print(*res)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	l = list(map(int, input().split()))
	flag = True
	for i in range(0, len(l)):
		if l[i] < 0:
			flag = False
			break
	if flag == False:
		print('No')
	else:
		print('Yes')
		print(101)
		for i in range(0, 101):
			print(i, end=' ')
		print()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	for i in a:
		if i < 0:
			print('NO')
			break
	else:
		print('YES')
		print(101)
		for i in range(101):
			print(i, end=' ')
		print()


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	A = sorted(map(int, input().split()))
	if A[0] < 0:
		print('NO')
	else:
		print('YES')
		print(101)
		print(*list(range(0, 101)))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	i = 1
	while i < len(a) and len(a) <= 300:
		j = 0
		while j < i and len(a) <= 300:
			if a[i] != a[j] and abs(a[i] - a[j]) not in a:
				a.append(abs(a[i] - a[j]))
			j += 1
		i += 1
	if len(a) > 300:
		print('NO')
	else:
		print('YES')
		print(len(a))
		print(*a)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = len(a)
	ans = 0
	n = len(a)
	i = 0
	j = 0
	f = 1
	while 1:
		while i < len(a):
			if len(a) > 300:
				ans = 1
				break
			j = 0
			while j < len(a):
				if len(a) > 300:
					f = 0
					ans = 1
					break
				if i != j:
					if abs(a[i] - a[j]) not in a:
						a.append(abs(a[i] - a[j]))
				j = j + 1
			i = i + 1
		for i in range(len(a)):
			if len(a) > 300:
				ans = 1
				break
			for j in range(len(a)):
				if i != j:
					if abs(a[i] - a[j]) in a:
						f = 1
					else:
						f = 0
						break
		if f == 1:
			ans = 0
			break
		ln = len(a)
		if l == ln:
			ans = 0
			break
		if ln > 300:
			ans = 1
			break
	if ans == 0:
		print('YES')
		print(len(a))
		print(*a)
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if any((i < 0 for i in a)):
		print('NO')
		continue
	g = a[0]
	for i in a:
		g = math.gcd(g, i)
	m = max(a)
	ans = [i for i in range(min(min(a), g), max(a) + 1, g)]
	if len(ans) <= 300:
		print('Yes')
		print(len(ans))
		print(*ans)
	else:
		print('No')


for test in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	mx = 0
	c = 0
	for i in a:
		if i > mx:
			mx = i
		elif i < 0:
			c += 1
	if c >= 1:
		print('NO')
	else:
		ans = [j for j in range(mx + 1)]
		print('YES')
		print(mx + 1)
		print(*ans)


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if a[0] < 0:
		print('NO')
	else:
		print('YES')
		print(101)
		print(*[i for i in range(101)])
	t = t - 1


def solN():
	n = int(input())
	r = list(map(int, input().split()))
	(g, h) = (min(r), max(r))
	if g < 0:
		print('NO')
		return
	print('YES')
	print(h + 1)
	for i in range(0, h + 1):
		print(i, end=' ')
	print()

def main():
	for _ in range(int(input())):
		solN()
main()


import sys

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

def get_array():
	return list(get_ints())

def input():
	return sys.stdin.readline().strip()
T = int(input())
while T > 0:
	n = int(input())
	Arr = get_array()
	Arr.sort()
	if Arr[0] < 0:
		print('NO')
	else:
		p = Arr[-1]
		print('YES')
		print(p + 1)
		ans = [i for i in range(0, p + 1)]
		print(*ans)
	T -= 1


for i in range(int(input())):
	n = int(input())
	l = [*map(int, input().split())]
	k = 0
	for i in l:
		if i < 0:
			k = 1
			print('No')
			break
	if k == 0:
		print('Yes')
		print(101)
		for i in range(101):
			print(i, end=' ')
		print()


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if all((i >= 0 for i in arr)):
		print('YES')
		print(max(arr) + 1)
		print(*range(max(arr) + 1))
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = len(a)
	f = 0
	for m in a:
		if m < 0:
			f = 0
			break
		else:
			f = 1
	if f == 1:
		print('YES')
		print(101)
		for j in range(0, 101):
			print(j, end=' ')
		print('')
	elif f == 0:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	if l[0] < 0:
		print('no')
		continue
	k = [i for i in range(0, l[-1] + 1)]
	print('yes')
	print(len(k))
	print(*k)


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	a = list(map(int, sys.stdin.readline().split()))
	b = a[:]
	while len(b) <= 300:
		s = set(b)
		c = set()
		for i in range(len(b) - 1):
			for j in range(i + 1, len(b)):
				if abs(b[i] - b[j]) not in s:
					c.add(abs(b[i] - b[j]))
		if len(c) > 0:
			b += list(c)
		else:
			print('YES')
			print(len(b))
			print(*b)
			break
	else:
		print('NO')


def determine_new_numbers(numbers_array):
	new_items = set(numbers_array)
	for i in range(0, len(numbers_array) - 1):
		for j in range(i + 1, len(numbers_array)):
			diff = abs(numbers_array[i] - numbers_array[j])
			if diff not in new_items:
				new_items.add(diff)
	return (new_items, tuple(new_items))
t = int(input())
for _ in range(t):
	n = int(input())
	numbers_array = tuple(map(int, input().split()))
	old_numbers = set(numbers_array)
	if tuple(filter(lambda a: a < 0, old_numbers)):
		print('NO')
		continue
	while len(numbers_array) < 300:
		(new_numbers, numbers_array) = determine_new_numbers(numbers_array)
		if new_numbers == old_numbers:
			break
		old_numbers = new_numbers
	if len(numbers_array) <= 300:
		res = 'YES\n{}\n{}'.format(len(numbers_array), ' '.join(map(str, numbers_array)))
		print(res)
	else:
		print('NO')


import sys, os, io
from sys import stdin, stdout
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
MOD = 1000000000 + 7
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

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

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 list(set(l))

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 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
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

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

def li():
	return list(map(int, input().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')

def power_set(L):
	cardinality = len(L)
	n = 2 ** cardinality
	powerset = []
	for i in range(n):
		a = bin(i)[2:]
		subset = []
		for j in range(len(a)):
			if a[-j - 1] == '1':
				subset.append(L[j])
		powerset.append(subset)
	powerset_orderred = []
	for k in range(cardinality + 1):
		for w in powerset:
			if len(w) == k:
				powerset_orderred.append(w)
	return powerset_orderred

def fastPlrintNextLines(a):
	print('\n'.join(map(str, a)))

def sortByFirstAndSecond(A):
	A = sorted(A, key=lambda x: x[0])
	A = sorted(A, key=lambda x: x[1])
	return list(A)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	flag = True
	for i in li:
		if i < 0:
			flag = False
	if flag == False:
		print('NO')
	else:
		print('YES')
		print(101)
		li = [i for i in range(101)]
		print(*li)


for _ in range(int(input())):
	n = int(input())
	list1 = list(map(int, input().split()))
	isneg = 0
	for i in list1:
		if i < 0:
			isneg = 1
			break
	if isneg:
		print('NO')
	else:
		ans = []
		for i in range(max(list1) + 1):
			ans.append(i)
		print('yes')
		print(len(ans))
		print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sp = True
	for i in a:
		if i < 0:
			sp = False
			break
	if sp:
		print('YES')
		print(max(a) + 1)
		print(' '.join([str(i) for i in range(max(a) + 1)]))
	else:
		print('NO')


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	x = arr[0]
	if arr[0] < 0:
		print('NO')
		return
	if x == 0:
		x = arr[1]
	for i in range(n):
		x = gcd(x, arr[i])
	print('YES')
	a = []
	for i in range(min(arr[0], x), arr[n - 1] + 1, x):
		a.append(i)
	print(len(a))
	for i in range(len(a)):
		print(a[i], end=' ')
	print()
t = int(input())
for i in range(t):
	main()


from os import path
from io import BytesIO, IOBase
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, Counter, 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 bo(i):
	return ord(i) - ord('0')
file = 1

def ceil(a, b):
	return (a + b - 1) // b

def solve():
	for _ in range(1, ii() + 1):
		n = ii()
		a = li()
		diff = set()
		f = 0
		g = 0
		for i in range(n):
			if a[i] < 0:
				f = 1
			if a[i] > 0:
				g = gcd(g, a[i])
			for j in range(i + 1, n):
				x = abs(a[i] - a[j])
				if x not in a:
					diff.add(x)
		if len(diff) == 0:
			print('YES')
			print(len(a))
			print(*a)
		elif f:
			print('NO')
		else:
			mx = max(a)
			x = []
			for i in range(g, mx + 1, g):
				x.append(i)
				if len(x) > 300:
					f = 1
					break
			if f:
				print('NO')
			else:
				print('YES')
				if 0 in a:
					x.append(0)
				print(len(x))
				print(*x)
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()


for _ in range(int(input())):
	n = int(input())
	li = set(map(int, input().split()))
	while len(li) <= 300:
		cur = li.copy()
		for i in cur:
			for j in cur:
				if abs(i - j) not in li:
					li.add(abs(i - j))
		if cur == li:
			break
	if len(li) > 300:
		print('NO')
	else:
		print('YES')
		print(len(li))
		print(*li)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	t = 0
	for e in l:
		if e < 0:
			print('NO')
			t = 1
			break
	if t == 0:
		print('YES')
		print(101)
		print(*list(range(0, 101)))


import math
from collections import defaultdict
t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	b.sort()
	if b[0] < 0:
		print('NO')
	else:
		ans = []
		d = dict()
		for j in b:
			d[j] = 1
			ans.append(j)
		for j in range(0, b[-1] + 1):
			ans.append(j)
		print('YES')
		ans = list(set(ans))
		print(len(ans))
		print(*ans)


from math import gcd
t = int(input())
res = []
for i in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	if ar[0] < 0:
		res.append(['NO'])
	elif max(ar) <= 100:
		res.append(['YES', [p for p in range(101)]])
	else:
		res.append(['NO'])
for item in res:
	if item[0] == 'NO':
		print('NO')
	else:
		print('YES')
		print(len(item[1]))
		for some in item[1]:
			print(some, end=' ')
		print()


def nice(arr, n):
	if any((num < 0 for num in arr)):
		return 'No'
	arr_distinct = set(arr)
	converged = False
	while not converged:
		converged = True
		for i in range(1, n):
			for j in range(i):
				absdiff = abs(arr[i] - arr[j])
				if absdiff not in arr_distinct:
					arr_distinct.add(absdiff)
					arr.append(absdiff)
					n += 1
					converged = False
					if n > 300:
						return 'No'
	print('Yes')
	print(n)
	return ' '.join((str(num) for num in arr))
T = int(input())
for t in range(T):
	n = int(input())
	arr = [int(num) for num in input().split()]
	print(nice(arr, n))


import sys
from math import gcd, sqrt
sys.setrecursionlimit(10 ** 5)
inf = float('inf')
en = lambda x: list(enumerate(x))
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())

def solve():
	n = ii()
	arr = rr()
	if any((i < 0 for i in arr)):
		print('NO')
		return
	print('YES')
	print(max(arr) + 1)
	print(*range(max(arr) + 1))
for _ in range(ii()):
	solve()


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, defaultdict
import bisect
import math
import bisect

def can(a):
	for i in range(len(a)):
		for j in range(i + 1, len(a)):
			if i == j:
				continue
			if abs(a[j] - a[i]) not in a:
				return False
	return True
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	f = 1
	arr.sort()
	has = set(arr)
	while len(arr) <= 300 and f == 1:
		ls = set()
		f = 0
		for i in range(len(arr)):
			for j in range(i + 1, len(arr)):
				if i == j:
					continue
				if abs(arr[j] - arr[i]) not in has:
					ls.add(abs(arr[j] - arr[i]))
					f = 1
		if f == 1:
			arr.extend(list(ls))
			has = has.union(ls)
	if can(arr) == False:
		print('NO')
	else:
		print('YES')
		print(len(arr))
		print(*arr)


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
from collections import defaultdict as dd
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdmap = lambda : map(int, stdstr().split())
stdarr = lambda : list(map(int, stdstr().split()))
mod = 1000000007
for _ in range(stdint()):
	n = stdint()
	arr = stdarr()
	c = Counter(arr)
	while True:
		i = 0
		j = 1
		added = 0
		while i < len(arr):
			j = i + 1
			while j < len(arr):
				diff = abs(arr[i] - arr[j])
				if diff not in c:
					c[diff] += 1
					arr.append(diff)
					added += 1
				if len(arr) > 300:
					break
				j += 1
			i += 1
			if len(arr) > 300:
				break
		if len(arr) > 300:
			break
		if added == 0:
			break
	if len(arr) > 300:
		print('NO')
		continue
	print('YES')
	print(len(arr))
	print(*arr)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	no = False
	for i in a:
		if i < 0:
			no = True
	if no:
		print('NO')
	else:
		while True:
			add_list = []
			for index in range(len(a) - 1):
				for index2 in range(index + 1, len(a)):
					num = abs(a[index] - a[index2])
					if num not in a:
						if num not in add_list:
							add_list.append(abs(a[index] - a[index2]))
			if len(add_list) > 0:
				a.extend(add_list)
			else:
				break
		print('YES')
		print(len(a))
		print(*a)


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

def rl():
	return list(input().split())
for _ in range(int(input())):
	n = int(input())
	l = ri()
	z = set(l)
	i = 0
	ok = True
	while i < len(l):
		for j in range(len(l)):
			if i == j:
				continue
			a = abs(l[i] - l[j])
			if a not in z:
				l.append(a)
				z.add(a)
			if len(l) > 300:
				ok = False
				break
		if not ok:
			break
		i += 1
	if not ok:
		print('no')
		continue
	print('yes')
	print(len(l))
	print(' '.join(map(str, l)))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	g = []
	for i in range(0, 101):
		g.append(i)
	neg = False
	for j in range(0, n):
		if a[j] < 0:
			print('no')
			neg = True
			break
		else:
			continue
	if not neg:
		print('yes')
		print(101)
		print(*g)


import sys
import math
input = sys.stdin.readline

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

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

def insr():
	s = input()
	return list(s.rstrip())

def invr():
	return map(int, input().split())
t = inp()
for i in range(t):
	n = inp()
	a = inlt()
	good = False
	if min(a) < 0:
		print('NO')
	else:
		while not good and len(a) <= 300:
			P = []
			for i in range(len(a)):
				for j in range(i + 1, len(a)):
					if abs(a[i] - a[j]) not in P and abs(a[i] - a[j]) not in a:
						P.append(abs(a[i] - a[j]))
			if len(P):
				a = a + P
			else:
				good = True
		if len(a) <= 300:
			print('YES')
			print(len(a))
			print(' '.join(map(str, a)))
		else:
			print('NO')


t = int(input())
for i in range(t):
	c = 0
	m = 0
	n = int(input())
	l = list(map(int, input().split()))
	for item in l:
		if item < 0:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		for i in range(n):
			for j in range(i + 1, n):
				if l[i] > l[j]:
					if l.count(l[i] - l[j]) == 0:
						c = 1
						break
				elif l.count(l[j] - l[i]) == 0:
					c = 1
					break
			if c == 1:
				break
		if c == 1:
			m = max(l)
			print('YES')
			print(m + 1)
			for i in range(0, m + 1):
				print(i, end=' ')
			print()
		else:
			print('YES')
			print(len(l))
			for item in l:
				print(item, end=' ')
			print()


import sys
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
get_int = lambda : int(input())
get_ints = lambda : map(int, input().split())
get_ints_list = lambda : list(get_ints())
t = get_int()

def get_v(a):
	s = set(a)
	n = len(a)
	newv = []
	for i in range(n):
		for j in range(i + 1, n):
			if abs(a[i] - a[j]) not in s:
				newv.append(abs(a[i] - a[j]))
				s.add(abs(a[i] - a[j]))
	return newv
for _ in range(t):
	n = get_int()
	a = get_ints_list()
	good = True
	for i in range(n):
		if a[i] < 0:
			good = False
			break
	if not good:
		print('NO')
		continue
	while True:
		v = get_v(a)
		if not v:
			good = True
			break
		a.extend(v)
		if len(a) > 300:
			good = False
			break
	if not good:
		print('NO')
	else:
		print('YES')
		print(len(a))
		print(' '.join(map(str, a)))


from math import gcd
t = int(input())
for i in range(t):
	n = int(input())
	m = [int(c) for c in input().split(' ')]
	if min(m) < 0:
		print('no')
		continue
	else:
		print('yes')
		gd = m[0]
		for j in range(1, len(m)):
			gd = gcd(gd, m[j])
		l = int(max(m) / gd)
		sol = [str(int(gd * k)) for k in range(l + 1)]
		soll = ' '.join(sol)
		print(len(sol))
		print(soll)


for _ in range(int(input())):
	N = int(input())
	(a, flag) = (list(map(int, input().split())), False)
	res = [i for i in range(101)]
	for i in a:
		if i < 0:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')
		print(101)
		print(*res)


import sys, math

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

def solution():
	for _ in range(int(input())):
		n = int(input())
		a = scan()
		a.sort()
		if a[0] < 0:
			print('NO')
		else:
			print('YES')
			print(min(max(a) + 1, 300 + 1))
			for i in range(min(max(a) + 1, 300 + 1)):
				print(i, end=' ')
			print()
solution()


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	n = inp()
	a = inara()
	b = set(a)
	while len(b) < 300:
		flag = False
		for i in range(n):
			for j in range(i + 1, n):
				diff = abs(a[j] - a[i])
				if not diff in b:
					b.add(diff)
					flag = True
		if flag == False:
			break
		a = list(b)
		n = len(a)
	flag = True
	for i in range(n):
		for j in range(i + 1, n):
			diff = abs(a[j] - a[i])
			if not diff in b:
				flag = False
	if flag:
		print('Yes')
		print(len(b))
		print(*b)
	else:
		print('No')


import io, os
from functools import reduce
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
int10 = lambda n: int(n, 10)
t = int10(input().decode())

def cal(a: list):
	while 1:
		n = len(a)
		for i in range(n):
			for j in range(i + 1, n):
				if abs(a[i] - a[j]) not in a:
					a.append(abs(a[i] - a[j]))
					if len(a) > 300:
						return None
		if len(a) == n:
			break
	return a
for _ in range(t):
	n = int10(input().decode())
	a = list(map(int, input().decode().split()))
	failed = False
	for ai in a:
		if ai < 0:
			failed = True
			break
	if failed:
		print('no')
		continue
	res = cal(a)
	if res:
		print('yes')
		print(len(res))
		print(' '.join([str(c) for c in res]))
	else:
		print('no')


import sys
IS_INTERACTIVE = False
input = input
if not IS_INTERACTIVE:
	(*data,) = sys.stdin.read().split('\n')[::-1]

	def input():
		return data.pop()

def fprint(*args, **kwargs):
	print(*args, **kwargs, flush=True)

def eprint(*args, **kwargs):
	print(*args, **kwargs, file=sys.stderr)
for _ in range(int(input())):
	n = int(input())
	(*arr,) = map(int, input().split())
	has_neg = False
	for v in arr:
		has_neg |= v < 0
	if has_neg:
		print('NO')
	else:
		print('YES')
		mx = max(arr) + 1
		print(mx)
		print(*range(mx))


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 *
from operator import itemgetter, attrgetter
import math
import heapq as hq
x = [i for i in range(300)]
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		if l[i] < 0:
			print('No')
			break
	else:
		print('YES')
		print(300)
		print(*x)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	if min(l) < 0:
		print('NO')
	else:
		x = 0
		while len(s) <= 300 and x <= 100:
			for i in range(n):
				s.add(l[i])
				for j in range(n):
					if i != j:
						s.add(abs(l[i] - l[j]))
			x += 1
			l = list(s)
			n = len(s)
		print('YES')
		print(len(s))
		print(*list(s))


def zip_sorted(a, b):
	return (zip(*sorted(zip(a, b)))[0], zip(*sorted(zip(a, b)))[1])

def gcd(a, b):
	return math.gcd(a, b)

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

def ncr(n, r):
	return math.comb(n, r)

def npr(n, r):
	return math.factorial(n) // math.factorial(n - r)

def decimal_to_binary(n):
	return bin(n).replace('0b', '')

def binary_to_decimal(s):
	return int(s, 2)
import sys, os.path
import math
from collections import defaultdict, deque
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
S = lambda : list(map(str, input()))

def main():
	(t,) = I()
	for t1 in range(t):
		(n,) = I()
		a = I()
		min1 = min(a)
		max1 = max(a)
		if min1 < 0:
			print('NO')
		else:
			print('YES')
			print(max1 + 1)
			print(*[i for i in range(max1 + 1)])
main()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	count = 0
	B = []
	for i in A:
		B.append(i)
	for i in A:
		if i < 0:
			count += 1
	if count >= 1:
		print('NO')
	else:
		print('YES')
		print(299)
		for i in range(0, 299):
			print(i, end=' ')
		print()


def solve(a):
	a_extension = build_list([], a)
	b = a.copy()
	ans = 'YES'
	while len(a_extension) != 0:
		if len(a) + len(a_extension) <= 300:
			b.extend(a_extension)
			a_extension = build_list(a, a_extension)
			a = b.copy()
		else:
			ans = 'NO'
			b = []
			break
	if ans == 'YES':
		print(ans)
		print(len(b))
		for x in b:
			(print(x),)
	elif ans == 'NO':
		print(ans)

def build_list(a, a_extension_old):
	a_copy = a_extension_old.copy()
	a_copy.extend(a)
	a_extension = []
	for x in a_extension_old:
		a_copy.pop(0)
		for y in a_copy:
			z = abs(x - y)
			if z not in a and z not in a_extension_old and (z not in a_extension):
				a_extension.append(z)
	return a_extension
num_of_cases = int(input())
for i in range(0, num_of_cases):
	n = int(input())
	a = [int(x) for x in input().split()]
	solve(a)


cases = int(input())
for case in range(0, cases):
	n = int(input())
	array = [int(x) for x in input().split(' ')]
	no = False
	for num in array:
		if num < 0:
			print('No')
			no = True
			break
	if no:
		continue
	result = list(range(0, max(array) + 1))
	print('Yes')
	print(len(result))
	print(*result)


from collections import deque
for ti in range(int(input())):
	n = int(input())
	A = deque((int(a) for a in input().split()))
	B = set(A)
	C = []
	while A:
		ai = A.popleft()
		for aj in C:
			b = abs(ai - aj)
			if b in B:
				continue
			A.append(b)
			B.add(b)
			if len(B) > 300:
				break
		C.append(ai)
		if len(B) > 300:
			break
	if len(B) <= 300:
		print('YES')
		print(len(B))
		print(' '.join(map(str, B)))
	else:
		print('NO')