#define _CRT_SECURE_NO_WARNINGS
#pragma GCC optimize("Ofast", "-funroll-loops", "-fdelete-null-pointer-checks")
#pragma GCC target("ssse3", "sse3", "sse2", "sse", "avx2", "avx")
#pragma GCC optimize(3, "Ofast", "inline")
#define foru(i, k, n) for (int i = k; i < n; i++)
#define ford(i, k, n) for (int i = k; i >= n; i--)
#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define SIZE 500000
#define MAX_N 101
#define INF 1e7
using namespace std;
//typedef int ll;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef unsigned long long ull;
/***********************************************************************************/
ll t, n, temp;
string s;

int main() {
	fast;
	cin >> t;
	while (t--) {
		cin >> n;
		set<ll> a;
		bool ans = true;
		for (ll i = 0; i < n; i++)
		{
			cin >> temp;
			ans &= temp >= 0;
			a.insert(temp);
		}
		while (ans) {
			set<ll> toAdd;
			for (auto x : a) {
				for (auto y : a) {
					if (x != y and a.find(abs(x - y)) == a.end()) {
						toAdd.insert(abs(x - y));
					}
				}
			}
			if (toAdd.size() == 0 or a.size() > 300) break;
			for (auto x : toAdd) a.insert(x);
		}
		if (!ans or a.size() > 300) cout << "NO\n";
		else {
			cout << "YES\n";
			cout << a.size() << '\n';
			for (auto x : a) cout << x << ' ';
			cout << '\n';
		}
	}
}