#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 stk[500500], top;
bool vis[500500];
void dfs1(int u, int fa) {
  vis[stk[++top] = u] = 1;
  for (int i = 0, v; i < g[u].size(); i++)
    if (vis[v = g[u][i]]) {
      if (!tot && v != fa) {
        int p = top;
        while (stk[p] != v) ans[++tot] = stk[p--];
        ans[++tot] = v;
      }
    } else if (g[v].size() % 3 == 2)
      dfs1(v, u);
  top--;
}
bool vis2[500500];
int n, pre[500500];
queue<int> q;
void path1(int u, int v) {
  for (int i = 1; i <= n; i++) vis2[i] = 0;
  q.push(u);
  vis2[u] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0, v; i < g[u].size(); i++)
      if (!vis2[v = g[u][i]]) {
        vis2[v] = 1;
        pre[v] = u;
        q.push(v);
      }
  }
  while (v) {
    ans[++tot] = v;
    v = pre[v];
  }
}
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 && g[g[u][i]].size() % 3 == 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 (g[v].size() % 3 == 1)
        sl[++tn] = u;
      else
        dfs2(v);
}
int m, rt, fl;
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++)
    if (g[i].size() % 3 == 0) {
      ans[tot = 1] = i;
      goto END;
    }
  for (int i = 1; i <= n; i++)
    if (g[i].size() % 3 == 2 && !vis[i]) dfs1(i, 0);
  if (tot) goto END;
  for (int i = 1; i <= n; i++)
    if (g[i].size() % 3 == 1) rt = i;
  for (int i = 1; i <= n; i++)
    if (g[i].size() % 3 == 1 && i != rt) {
      path1(i, rt);
      break;
    }
  if (tot) goto END;
  for (int i = 1; i <= n; i++) vis[i] = 0;
  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 = 0;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
