#include <bits/stdc++.h>
using namespace std;
int ans[500500], tot;
vector<int> g[500500];
void adl(int u, int v) {
  g[u].push_back(v);
  g[v].push_back(u);
}
int n, dep[500500], fa[500500], d[500500];
bool vis[500500];
void clr() {
  for (int i = 1; i <= n; i++) vis[i] = 0;
}
void dfs1(int u) {
  vis[u] = 1;
  for (int i = 0, v; i < g[u].size(); i++)
    if (!vis[v = g[u][i]] && d[v] == 2) {
      dep[v] = dep[fa[v] = u] + 1;
      dfs1(v);
    }
}
int pre[500500];
queue<int> q;
void bfs(int su) {
  clr();
  q.push(su);
  vis[su] = 1;
  pre[su] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (d[u] == 1 && u != su) continue;
    for (int i = 0, v; i < g[u].size(); i++)
      if (!vis[v = g[u][i]]) {
        vis[v] = 1;
        pre[v] = u;
        q.push(v);
      }
  }
  for (int i = 1; i <= n; i++)
    if (d[i] == 1 && i != su && vis[i]) {
      int p = i;
      while (p) {
        ans[++tot] = p;
        p = pre[p];
      }
      break;
    }
}
int stk[500500], top;
void dfs3(int u, int fa, int to) {
  stk[++top] = u;
  if (u == to) {
    for (int i = 1; i <= top; i++) ans[++tot] = stk[i];
  }
  for (int i = 0; i < g[u].size(); i++)
    if (g[u][i] != fa && d[g[u][i]] == 2) dfs3(g[u][i], u, to);
  top--;
}
void path2(int u, int v) { dfs3(u, 0, v); }
int sl[500500], tn;
void dfs2(int u) {
  vis[u] = 1;
  for (int i = 0, v; i < g[u].size(); i++)
    if (!vis[v = g[u][i]])
      if (d[v] == 1) sl[++tn] = u;
  for (int i = 0, v; i < g[u].size(); i++)
    if (!vis[v = g[u][i]])
      if (d[v] == 2) dfs2(v);
}
int m, rt, fl, minc;
void solve() {
  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i <= m; i++) {
    scanf("%d%d", &u, &v);
    adl(u, v);
  }
  for (int i = 1; i <= n; i++) d[i] = g[i].size() % 3;
  for (int i = 1; i <= n; i++)
    if (d[i] == 0) {
      ans[tot = 1] = i;
      goto END;
    }
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && !vis[i]) dfs1(i);
  minc = n;
  for (int u = 1; u <= n; u++)
    if (d[u] == 2)
      for (int i = 0, v; i < g[u].size(); i++)
        if (d[v = g[u][i]] == 2)
          if (dep[u] - dep[v] > 1) minc = min(minc, dep[u] - dep[v]);
  for (int u = 1; u <= n; u++)
    if (d[u] == 2)
      for (int i = 0, v; i < g[u].size(); i++)
        if (d[v = g[u][i]] == 2)
          if (dep[u] - dep[v] == minc) {
            int p = u;
            while (p != v) {
              ans[++tot] = p;
              p = fa[p];
            }
            ans[++tot] = v;
            goto END;
          }
  if (tot) goto END;
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) rt = i;
  bfs(rt);
  if (tot) goto END;
  clr();
  for (int i = 1; i <= n; i++)
    if (g[i].size() % 3 == 2 && !vis[i]) {
      dfs2(i);
      path2(sl[1], sl[2]);
      tn = 0;
      fl++;
      if (fl == 2) break;
    }
  ans[++tot] = rt;
END:
  if (tot == n)
    puts("No");
  else {
    printf("Yes\n%d\n", n - tot);
    for (int i = 1; i <= n; i++) vis[i] = 0;
    for (int i = 1; i <= tot; i++) vis[ans[i]] = 1;
    for (int i = 1; i <= n; i++)
      if (!vis[i]) printf("%d ", i);
    puts("");
  }
  for (int i = 1; i <= n; i++) {
    g[i].clear();
    vis[i] = 0;
  }
  tn = tot = fl = 0;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
