#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define inf 100000000000
#define mod 1000000007
 double power(double x,ll n)
{
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return power((x*x),n/2);
    else                             //n is odd
        return (x*power((x*x),(n-1)/2));

}
ll C(ll n, ll r) {
    if(r > n - r) r = n - r; // because C(n, r) == C(n, n - r)
    long long ans = 1;
    int i;

    for(i = 1; i <= r; i++) {
        ans =((ans) * (n - r + i));
        ans =(ans)/i;
    }

    return ans;
}
ll modularExponentiation(ll x,ll n,ll M)
{
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return modularExponentiation((x*x)%M,n/2,M);
    else                             //n is odd
        return (x%M*modularExponentiation((x*x)%M,(n-1)/2,M)%M)%M;

}

ll modInverse(ll A,ll M)
{
    return modularExponentiation(A,M-2,M);
}

void solve()
{
    ll n,i,temp,temp1,diff;
    map<ll,ll> m1;
    queue<ll> q1;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>temp;
        m1[temp]++;
        q1.push(temp);
    }
    while(q1.size()!=0)
    {
        temp=q1.front();
        q1.pop();
        for(auto x:m1)
        {
            temp1=x.first;
            if(temp>temp1)
            {
                diff=temp-temp1;
                if(m1[diff]==0)
                {
                    m1[diff]=1;
                    q1.push(diff);
                }
            }
            else if(temp<temp1)
            {
                diff=temp1-temp;
                if(m1[diff]==0)
                {
                    m1[diff]=1;
                    q1.push(diff);
                }
            }
          if(m1.size()>300)
          {
              cout<<"NO"<<endl;
              return ;
          }
        }
    }
    cout<<"YES"<<endl;
    cout<<m1.size()<<endl;
    for(auto x:m1)
        cout<<x.first<<" ";
    cout<<endl;
}
int main()
{
    ll t;
    cin>>t;
    while(t--)
    solve();
   return 0;
}



