#include <bits/stdc++.h>

const int MAX_N = 5e5 + 5;

int t, n, m, deg[MAX_N], pre[MAX_N];
std::bitset<MAX_N> chk;
std::vector<int> adj[MAX_N];

bool print_ans()
{
	if (chk.count() == 0) return false;
	std::cout << "Yes\n" << chk.count() << '\n';
	for (int i = chk._Find_first(); i < MAX_N; i = chk._Find_next(i))
		std::cout << i << ' ';
	std::cout << '\n';
	return true;
}

bool case_1()
{
	for (int i = 1; i <= n; ++i)
		if (deg[i] == 0)
		{
			chk.reset(i);
			return print_ans();
		}
	return false;
}

bool case_2()
{
	for (int s = 1; s <= n; ++s)
		if (deg[s] == 1)
		{
			pre[s] = -1;
			std::queue<int> que;
			for (que.push(s); !que.empty(); que.pop())
				for (int i : adj[que.front()])
					if (pre[i] == 0)
					{
						pre[i] = que.front();
						que.push(i);
						if (deg[i] == 1)
						{
							for (; i != -1; i = pre[i])
								chk.reset(i);
							return print_ans();
						}
					}
			return false;
		}
	return false;
}

bool case_3()
{
	std::fill(pre + 1, pre + n + 1, 0);
	for (int i = 1; i <= n; ++i)
		if (deg[i] == 2 && pre[i] == 0)
		{
			pre[i] = -1;
			std::queue<int> que;
			for (que.push(i); !que.empty(); que.pop())
				for (int j : adj[que.front()])
					if (deg[j] == 2)
						if (pre[j] == 0)
						{
							pre[j] = que.front();
							que.push(j);
						}
						else if (j != pre[que.front()])
						{
							for (int k = j; k != -1; k = pre[k])
								chk.reset(k);
							for (int k = que.front(), f = 0; k != -1; k = pre[k])
								if (chk.test(k)) chk.reset(k);
								else if (f) chk.set(k);
								else f = 1;
							return print_ans();
						}
		}
	return false;
}

bool dfs(int i, bool f = true)
{
	chk.reset(i);
	pre[i] = 1;
	for (int j : adj[i])
		if ((deg[j] == 1 && f) || (pre[j] == 0 && dfs(j))) return true;
	chk.set(i);
	return false;
}

bool case_4()
{
	std::fill(pre + 1, pre + n + 1, 0);
	for (int i = 1; i <= n; ++i)
		if (deg[i] == 1)
		{
			chk.reset(i);
			bool f = false;
			for (int j : adj[i])
				if (pre[j] == 0)
				{
					dfs(j, false);
					if (f) return print_ans();
					else f = true;
				}
		}
	return false;
}

int main()
{
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(nullptr); std::cout.tie(nullptr);
	
	std::cin >> t;
	while (t--)
	{
		std::cin >> n >> m;
		while (m--)
		{
			int u, v;
			std::cin >> u >> v;
			adj[u].push_back(v);
			adj[v].push_back(u);
		}
		for (int i = 1; i <= n; ++i) deg[i] = adj[i].size() % 3;
		for (int i = 1; i <= n; ++i) chk.set(i);
		if (!case_1() && !case_2() && !case_3() && !case_4())
			std::cout << "No\n";
		for (int i = 1; i <= n; ++i) chk.reset(i);
		for (int i = 1; i <= n; ++i) adj[i].clear();
	}
	
	return 0;
}
