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

int main()
{
    ll t=1,n,i,j,k,x,y,z;
    cin>>t;
    while(t--){
        cin>>n;
        vector<ll>v;
        map<ll,ll>m;
        for(i=0;i<n;i++){
            cin>>x;
            v.push_back(x);
            m[x] = 1;
        }
        if(!m[0]) {v.push_back(0); n++;}
        while(n <= 300){
            for(i=0;i<n;i++){
                for(j=i+1;j<n;j++){
                    x = abs(v[i]-v[j]);
                    if(!m[x]){
                        v.push_back(x);
                        m[x] = 1;
                    }
                }
            }
            if(v.size() == n) break;
            n = v.size();
        }
        if(n > 300) {cout<<"NO"<<endl; continue;}
        cout<<"YES"<<endl;
        cout<<v.size()<<endl;
        for(auto i:v) cout<<i<<" ";
        cout<<endl;
    }
    return 0;
}