#include <bits/stdc++.h>
/*#pragma GCC optimize("Ofast,unroll-loops")
#pragma comment(linker, "/stack:200000000")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma,tune=native")*/
//#pragma GCC optimize("O2")
/*#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2,fma")*/
using namespace std;
using ll = long long int;
using ld = long double;
#define F first
#define S second
#define pb push_back
//#define mp make_pair
#define lc v<<1
#define rc v<<1|1
#define fast_io ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
const int N=5e5+10,LN=20,M=3.5e7+10,SQ=350,BS=737,inf=1e9+10;
const ll INF=1e18;
const ld ep=1e-7;
const int MH=1000696969,MOD=1000000007,MD=998244353;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using pll=pair<ll,ll>;
using pii=pair<int,int>;
#define ordered_set tree<pll, null_type,less<pll>, rb_tree_tag,tree_order_statistics_node_update>
ll pow(ll x, ll y, ll mod){
    ll ans=1;
    while (y != 0) {
        if (y & 1) ans = ans * x % mod;
        y >>= 1;
        x = x * x % mod;
    }
    return ans;
}
ll T,d[N],n,m,f[N],od[N],x,y,c[N],t,td;
vector<ll> adj[N],dfv,ans;
vector<ll> inv(vector<ll> v){
    vector<ll> ans;
    for(ll i=1; i<=n; i++) f[i]=0;
    for(ll i : v) f[i]=1;
    for(ll i=1; i<=n; i++) if(!f[i]) ans.pb(i);
    return ans;
}
void dfc(ll v, ll p){
    if(!ans.empty()) return;
    dfv.pb(v);
    f[v]=1;
    c[v]=t;
    for(ll u : adj[v]){
        if(u!=p && f[u]){
            ans=dfv;
            reverse(ans.begin(),ans.end());
            while(ans.back()!=u) ans.pop_back();
            break;
        }
    }
    for(ll u : adj[v]) if(d[u]==2 && !f[u]) dfc(u,v);
    dfv.pop_back();
}
void dfp(ll v){
    if(!ans.empty()) return;
    dfv.pb(v);
    f[v]=1;
    for(ll u : adj[v]){
        if(d[u]==1 && !f[u]){
            ans=dfv;
            ans.pb(u);
            break;
        }
    }
    for(ll u : adj[v]){
        if(!f[u] && d[u]==2) dfp(u);
    }
    dfv.pop_back();
}
void dfs(ll v, ll p){
    ans.pb(v);
    for(ll u : adj[v]){
        if(u==td && u!=p){
            return;
        }
    }
    for(ll u : adj[v]){
        if(u!=p){
            dfs(u,v);
            return;
        }
    }
}
void solve(){
    cin >> n >> m;
    dfv=ans={};
    t=0;
    if(n==1){
        cout << "No\n";
        return;
    }
    x=y=0;
    for(ll i=1; i<=n; i++){
        adj[i]={};
        c[i]=f[i]=od[i]=d[i]=0;
    }
    for(ll i=1; i<=m; i++){
        ll v,u;
        cin >> v >> u;
        adj[v].pb(u);
        adj[u].pb(v);
        od[v]++;
        od[u]++;
    }
    for(ll i=1; i<=n; i++){
        d[i]=od[i]%3;
        if(od[i]==1) x++;
        if(od[i]==2) y++;
        if(!d[i]){
            ans=inv({i});
            cout << "Yes\n" << n-1 << '\n';
            for(ll j : ans) cout << j << ' ';
            cout << '\n';
            return;
        }
    }
    if(y==n || (x==2 && y==n-2)){
        cout << "No\n";
        return;
    }
    fill(f,f+n+1,0);
    for(ll i=1; i<=n; i++){
        if(d[i]==2 && !f[i]){
            dfv={};
            t++;
            dfc(i,0);
        }
    }
    if(!ans.empty()){
        ans=inv(ans);
        cout << "Yes\n" << ans.size() << '\n';
        for(ll i : ans) cout << i << ' ';
        cout << '\n';
        return;
    }
    dfv={};
    fill(f,f+n+1,0);
    for(ll i=1; i<=n; i++){
        if(d[i]==1 && !f[i]){
            dfv={};
            td=i;
            dfp(i);
        }
    }
    if(!ans.empty()){
        ans=inv(ans);
        cout << "Yes\n" << ans.size() << '\n';
        for(ll i : ans) cout << i << ' ';
        cout << '\n';
        return;
    }
    fill(f,f+n+1,0);
    if(od[td]==4 && y==n-1){
        cout << "No\n";
        return;
    }
    ll g=0;
    ans={td};
    for(ll u : adj[td]){
        if(!f[c[u]]){
            dfs(u,td);
            g++;
            f[c[u]]=1;
        }
        if(g==2) break;
    }
    ans=inv(ans);
    cout << "Yes\n" << ans.size() << '\n';
    for(ll i : ans) cout << i << ' ';
    cout << '\n';
}
int main(){
    fast_io;
    cin >> T;
    while(T--){
        solve();
    }
    return 0;
}

