#include<bits/stdc++.h>
#define int long long
#define ll          long long
#define pb          push_back
#define    endl        '\n'
#define pii         pair<ll ,ll >
#define vi          vector<int >
#define vii         vector<pii>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define mod       1000000007
#define rep(i,a,b)    for(ll  i=a;i<b;i++)
#define rep0(a)     for(ll i=0;i<a;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define itr(a,it)          for(typeof((a).begin()) it=(a).begin();it!=(a).end();it++)
#define double        long double
using namespace std;
#define N  100005
#define M 1e9
ll bpow(ll a, ll b){ 
    int ans=1;
    while(b>0)
    {
        if(b&1)
            ans = ans*a%mod;
        b=b/2;
        a=a*a%mod;
    }
    return ans%mod;
}    
void solve()
{
    int n;
    cin>>n;
    vector<int>a(n);
    map<int,int>m;

    rep0(n) {cin>>a[i]; m[a[i]]=1;}
    // sort(all(a));
    while(1)
    {
        int f=0;
        rep0(n)
        {
            rep(j,0,n)
            {
                if(i==j)
                    continue;

                int x=abs(a[i]-a[j]);
                if(m[x]) continue;
                f=1;
                if(n>=300) 
                {
                    cout<<"NO";
                    return;
                }
                a.pb(x);
                m[x]=1;
                n++;
            }
        }
        if(f==0) break;
    }
    cout<<"YES"<<endl;
    cout<<n<<endl;
    rep0(n) cout<<a[i]<<" ";
} 
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    // freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int TESTS=1;
    cin>>TESTS;
    while(TESTS--)
    {
        solve();
       cout<<endl;
    }
    return 0;
}