#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int mrk[N], d[N], par[N], mark[N], n;
vector<int> adj[N];
queue<int> q;
void print() {
  int cnt = n;
  for (int i = 1; i <= n; i++) cnt -= mrk[i];
  if (cnt == 0 || cnt == n) {
    cout << "No\n";
    return;
  }
  cout << "Yes\n" << cnt << '\n';
  for (int i = 1; i <= n; i++)
    if (!mrk[i]) cout << i << ' ';
  cout << '\n';
}
void DFS(int v) {
  mark[v] = 1;
  for (int u : adj[v])
    if ((int)(adj[u].size()) % 3 == 2 && !mark[u]) DFS(u);
}
bool DFS2(int v, int p, int v1) {
  mrk[v] = 1;
  for (int u : adj[v])
    if (u == v1 && p != -1) return true;
  for (int u : adj[v])
    if (u != v1 && u != p)
      if (DFS2(u, v, v1)) return true;
  mrk[v] = 0;
  return false;
}
void solve() {
  int m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    mrk[i] = 0;
    d[i] = N;
    par[i] = 0;
    mark[i] = 0;
    adj[i].clear();
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (n < 3) {
    print();
    return;
  }
  int v1 = -1, t1 = 0, v2 = -1;
  for (int i = 1; i <= n; i++) {
    if ((int)(adj[i].size()) % 3 == 0) {
      mrk[i] = 1;
      return print();
    } else if ((int)(adj[i].size()) % 3 == 1)
      v1 = i, t1++;
    else
      v2 = i;
  }
  if (2 <= t1) {
    while (!q.empty()) q.pop();
    d[v1] = 0;
    q.push(v1);
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      if ((int)(adj[v].size()) % 3 == 1 && v != v1) {
        while (v) mrk[v] = 1, v = par[v];
        print();
        return;
      }
      for (int u : adj[v])
        if (d[u] == N) d[u] = d[v] + 1, par[u] = v, q.push(u);
    }
  }
  fill(d, d + n + 1, N);
  fill(par, par + n + 1, 0);
  while (!q.empty()) q.pop();
  d[v2] = 0;
  q.push(v2);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    int x = -1;
    for (int u : adj[v]) {
      if ((int)(adj[u].size()) % 3 == 1) continue;
      if (d[u] == N)
        d[u] = d[v] + 1, par[u] = v, q.push(u);
      else if (u != par[v] && (x == -1 || d[u] < d[x]))
        x = u;
    }
    if (x == -1) continue;
    while (v) mrk[v] = 1, v = par[v];
    while (x) mrk[x] = 1, x = par[x];
    print();
    return;
  }
  if (v1 == -1) {
    print();
    return;
  }
  int v21 = -1, v22 = -1;
  for (int u : adj[v1]) {
    if (mark[u]) continue;
    DFS(u);
    if (v21 == -1)
      v21 = u;
    else if (v22 == -1)
      v22 = u;
    else
      break;
  }
  mrk[v1] = 1;
  DFS2(v21, -1, v1);
  DFS2(v22, -1, v1);
  print();
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) solve();
  return 0;
}
