/*************************************************************************
	> File Name: CF1239F.cpp
	> Author: The-Out-Land
	> Mail: 2264454706@qq.com 
	> Created Time: 2020年10月12日 星期一 22时25分02秒
 ************************************************************************/

#include <bits/stdc++.h>

#define enter putchar('\n')
#define space putchar(' ')
#define re register
#define N 500010
#define M 1000010
#define Vec vector<int>

using namespace std;

inline int max(int x,int y){return (x>y?x:y);}

inline int min(int x,int y){return (x<y?x:y);}

int A,B;

bool v[N],V[N],flag;

int from[N],to[N],fa[N],dep[N],rt;

int ver[M],nex[M],head[N],rd[N],nu,cnt;

int n,m;

Vec now;

inline void add(int x,int y){
	ver[++nu]=y,nex[nu]=head[x],head[x]=nu;
	ver[++nu]=x,nex[nu]=head[y],head[y]=nu;
	return;
}

inline int read(){
	int x=0;char c=getchar();bool y=1;
	for(;c<'0' || c>'9';c=getchar()) if(c=='-') y=0;
	for(;c>='0' && c<='9';c=getchar()) x=(x<<1)+(x<<3)+c-48;
	if(y) return x;
	return -x;
}

inline void print(const Vec &a){
	puts("Yes");
	cout<<n-a.size()<<endl;
	for(re int i=0,sz=a.size();i<sz;++i) V[a[i]]=1;
	for(re int i=1;i<=n;++i)	if(!V[i]) printf("%d ",i);enter;
	return;
}

void dfs(int x){
	int y;
	if(v[x]) return;v[x]=1;now.push_back(x);
	for(re int i=head[x];i;i=nex[i]){
		y=ver[i];dfs(y);
	}
	return;
}

void dfs0(int x){
	int y;
	v[x]=1;now.push_back(x);
	
	for(re int i=head[x];i;i=nex[i]){
		y=ver[i];
		//cerr<<x<<" "<<y<<" "<<rd[y]<<" "<<B<<" "<<now.size()<<endl;
		if(rd[y]==1 && !v[y]) {now.push_back(y);B=1;return;}
	}
	for(re int i=head[x];i;i=nex[i]){
		y=ver[i];
		if(!v[y]) dfs0(y);
		if(B) return;
	}
	now.pop_back();
	return;
}

void dfs1(int x){
	int y,RT,z=0;
	if(v[x]) return;v[x]=1;
	for(re int i=head[x];i;i=nex[i]){
		y=ver[i];
		if(v[y]){
			if(fa[x]!=y)
			z=(!z?y:(dep[y]>dep[z]?y:z));
		}
	}

	if(z){
		B=1;
		RT=x;
		while(RT!=z) {
			now.push_back(RT),RT=fa[RT];
		}
		now.push_back(RT);
		return;
	}
	
	for(re int i=head[x];i;i=nex[i]){
		y=ver[i];
		if(!v[y])
		dep[y]=dep[x]+1,fa[y]=x,dfs1(y);
		if(B) return;
	}
	return;
}

queue <int> q;

void bfs(int s){
	int x=s,y,z=0;
	while(q.size()) q.pop();
	q.push(x);v[x]=1;
	for(re int i=1;i<=n;++i) dep[i]=0;
	while(!q.empty()){
		x=q.front();q.pop();
		for(re int i=head[x];i;i=nex[i]){
			y=ver[i];
			if(!v[y])	fa[y]=x,v[y]=1,dep[y]=dep[x]+1,q.push(y);
			if(y==rt && fa[x]!=rt)
			z=(!z?x:dep[x]<dep[z]?x:z);
		}
	}
	if(z){
		flag=1;
		while(z^rt) now.push_back(z),z=fa[z];
	}
	return;
}

inline void Assert(Vec a){
	static int R[N],Y[N];
	for(re int i=1;i<=n;++i) R[i]=Y[i]=0;
	for(re int i=0,sz=a.size();i<sz;++i){
		Y[a[i]]=1;
	}
	//cerr<<a.size()<<endl;
	for(re int i=1;i<=m;++i) if(Y[from[i]]&&Y[to[i]]) ++R[from[i]],++R[to[i]];
	for(re int i=0,sz=a.size();i<sz;++i){
		assert(R[a[i]]==2);
	}
	return;
}

inline void Input(){
	n=read(),m=read();
	for(re int i=1;i<=n;++i) rd[i]=head[i]=V[i]=v[i]=fa[i]=dep[i]=0;nu=0;rt=0;now.clear();
	flag=A=B=0;
	for(re int i=1;i<=m;++i){
		int u=read(),v=read();
		add(u,v);
		from[i]=u,to[i]=v;
		++rd[u],++rd[v];
	}
	return;
}

int T;

inline void solve(){
	if(n==1) return puts("No"),void();
	dfs(1);
	if(now.size()<n) return print(now);

	for(re int i=1;i<=n;++i){
		rd[i]%=3;
		if(rd[i]==0) return now.clear(),now.resize(1),now[0]=i,print(now);
		v[i]=head[i]=0;
	}
	
	
	nu=0;rt=B=0;now.clear();
	for(re int i=1;i<=m;++i){
		if(rd[from[i]]!=1 && rd[to[i]]!=1) add(from[i],to[i]),rt=from[i];
	}

	if(rt) dfs1(rt);if(B && now.size()<n) return Assert(now),print(now);



	for(re int i=1;i<=n;++i) v[i]=head[i]=0;nu=rt=0;
	for(re int i=1;i<=m;++i) add(from[i],to[i]);
	for(re int i=1;i<=n;++i){
		A+=(rd[i]==1);
		if(rd[i]==1) rt=i;
	}

	if(A>1 && n>2)	{now.clear(),dfs0(rt);if(now.size()<n) return print(now);}
		
	for(re int i=1;i<=n;++i){
		v[i]=fa[i]=0;if(rd[i]==1) rt=i;
	}
	if(rt && T<=10){
	now.clear();
	cnt=0;now.push_back(rt);v[rt]=1;
	for(re int i=head[rt];i;i=nex[i]){
		if(!v[ver[i]])
		flag=0,fa[ver[i]]=rt,bfs(ver[i]),cnt+=flag;
		if(cnt==2 && now.size()<n) return print(now);
	}
	}
	puts("No");
	return;
}

int main(){
	//freopen("data.in","r",stdin);
	//freopen("data.out","w",stdout);
	T=read();
	while(T--)
	{
		Input();
		solve();
	}
	return 0;
}