#include<iostream>
#include<string>
#include<stack>
#include<queue>
#include<deque>
#include<vector>
#include<algorithm>
#include<unordered_map>
#include<map>
#include<math.h>
#include<list>
#include<climits>
#include<bitset>
#include<set>
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define vvi vector<vector<int>>
#define vvll vector<vector<long long>>
using namespace std;

template<typename t>
void printArray(vector<t> &a)
{
    for(auto g : a)
    {
        cout<<g<<" ";
    }
}

template<typename t>
bool inputArray(vector<t> &a, int n,unordered_map<ll,int>&dp)
{
    a.resize(n);
    for(int i =0 ;i<n;i++)
    {
        cin>>a[i];
        if(dp.count(a[i]))
        {
            return false;
        }
        dp[a[i]]+=1;
    }
    return true;
}

void solve()
{
    int n;
    cin>>n;
    vll a;
    unordered_map<ll,int> dp;
    if(!inputArray<ll>(a,n,dp))
    {
        cout<<"NO"<<endl;
        return;
    }

    for(int i = 0;i<a.size();i++)
    {
        for(int j = i+1;j<a.size();j++)
        {
            if(dp.count(abs(a[i]-a[j])))
            {
                continue;
            }
            else{
                a.push_back(abs(a[i]-a[j]));
                if(a.size()>300)
                {
                    cout<<"NO"<<endl;
                    return;
                }
                dp[abs(a[i]-a[j])]+=1;
            }
        }
    }
    for(int i = 0;i<a.size();i++)
    {
        for(int j = i+1;j<a.size();j++)
        {
            if(dp.count(abs(a[i]-a[j])))
            {
                continue;
            }
            else{
                a.push_back(abs(a[i]-a[j]));
                if(a.size()>300)
                {
                    cout<<"NO"<<endl;
                    return;
                }
                dp[abs(a[i]-a[j])]+=1;
            }
        }
    }
    if(a.size()>300)
    {
        cout<<"NO"<<endl;
        return;
    }

    cout<<"YES"<<endl;
    cout<<a.size()<<endl;
    printArray<ll>(a);
    cout<<endl;
    return;
    
}

int main()
{

    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }
return 0;
}