#include <bits/stdc++.h>
using namespace std;
const int N = 500003;
template <typename T>
void rd(T &x) {
  int ch = getchar();
  x = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
}
template <typename T>
bool chmin(T &a, const T &b) {
  if (a > b) return a = b, 1;
  return 0;
}
int T, n, m, rt, d[N], dep[N], fa[N], q[N], fr, re;
vector<int> G[N], ans, lef;
bool bfs(int S) {
  memset(fa, 0, n + 1 << 2);
  fa[q[fr = 0] = S] = -1;
  re = 1;
  while (fr < re) {
    int u = q[fr++];
    if (d[u] == 1 && u != S) {
      for (int i = u; ~i; i = fa[i]) ans.emplace_back(i);
      return true;
    }
    for (int v : G[u])
      if (!fa[v]) fa[q[re++] = v] = u;
  }
  return false;
}
bool vis[N];
void dfs1(int x) {
  vis[x] = true;
  for (int v : G[x])
    if (!vis[v] && d[v] == 2) {
      dep[v] = dep[fa[v] = x] + 1;
      dfs1(v);
    }
}
void dfs2(int x) {
  vis[x] = true;
  for (int v : G[x])
    if (!vis[v] && d[v] == 1) lef.emplace_back(x);
  for (int v : G[x])
    if (!vis[v] && d[v] == 2) dfs2(v);
}
void bfs2(int S, int T) {
  memset(fa, 0, n + 1 << 2);
  fa[q[fr = 0] = S] = -1;
  re = 1;
  while (fr < re) {
    int u = q[fr++];
    if (u == T) {
      for (int i = u; ~i; i = fa[i]) ans.emplace_back(i);
      return;
    }
    for (int v : G[u])
      if (d[v] == 2 && !fa[v]) fa[q[re++] = v] = u;
  }
}
void solve() {
  rd(n);
  rd(m);
  ans.resize(0);
  for (int i = 1; i <= n; ++i) G[i].resize(0);
  for (int i = 1, u, v; i <= m; ++i) {
    rd(u);
    rd(v);
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }
  for (int i = 1; i <= n; ++i)
    if (!(d[i] = G[i].size() % 3)) {
      ans.emplace_back(i);
      return;
    }
  for (int i = 1; i <= n; ++i)
    if (d[i] == 1) {
      rt = i;
      break;
    }
  if (bfs(rt)) return;
  memset(vis, 0, n + 1);
  for (int i = 1; i <= n; ++i)
    if (d[i] == 2 && !vis[i]) {
      dep[i] = 0;
      dfs1(i);
    }
  int len = n;
  for (int i = 1; i <= n; ++i)
    if (d[i] == 2)
      for (int j : G[i])
        if (d[j] == 2 && dep[i] - dep[j] > 1) chmin(len, dep[i] - dep[j]);
  for (int i = 1; i <= n; ++i)
    if (d[i] == 2)
      for (int j : G[i])
        if (d[j] == 2 && dep[i] - dep[j] > 1)
          if (len == dep[i] - dep[j]) {
            for (int p = i; p != j; p = fa[p]) ans.emplace_back(p);
            ans.emplace_back(j);
            return;
          }
  memset(vis, 0, n + 1);
  int tmp = 2;
  for (int i = 1; i <= n; ++i)
    if (d[i] == 2 && !vis[i]) {
      lef.resize(0);
      dfs2(i);
      bfs2(lef[0], lef[1]);
      if (!--tmp) break;
    }
  ans.emplace_back(rt);
}
int main() {
  rd(T);
  while (T--) {
    solve();
    if (ans.size() == n)
      puts("No");
    else {
      memset(vis, 0, n + 1);
      printf("Yes\n%d\n", n - ans.size());
      for (int u : ans) vis[u] = true;
      for (int i = 1; i <= n; ++i)
        if (!vis[i]) printf("%d ", i);
      putchar('\n');
    }
  }
}
