#include <bits/stdc++.h>
using namespace std;
int T, n, m, deg[500010], s[500010], e[500010];
bool vis[500010];
vector<int> v[500010];
inline int cmp(int x, int y) { return deg[x] > deg[y]; }
vector<int> ans;
int fa[500010];
bool dfs(int np, int fath) {
  if (deg[np] % 3 != 2) return 0;
  fa[np] = fath;
  vis[np] = 1;
  for (auto &x : v[np]) {
    if (x == fath) continue;
    if (!vis[x]) {
      if (dfs(x, np)) return 1;
    } else {
      int p = np;
      while (p != x) ans.push_back(p), p = fa[p];
      ans.push_back(x);
      return 1;
    }
  }
  return 0;
}
bool dfs2(int np, int fath) {
  fa[np] = fath;
  vis[np] = 1;
  for (auto &x : v[np]) {
    if (x == fath) continue;
    if (deg[x] % 3 == 1) {
      int p = np;
      ans.push_back(x);
      while (fa[p]) ans.push_back(p), p = fa[p];
      ans.push_back(p);
      return 1;
    }
    if (vis[x]) continue;
    if (dfs2(x, np)) return 1;
  }
  return 0;
}
int visit[500010], stk[500010], top;
bool dfs3(int np, int fath) {
  visit[np]++;
  if (deg[np] % 3 == 1 && visit[np] == 3) {
    for (int i = 1; i <= top; i++)
      if (deg[stk[i]] % 3 == 2) ans.push_back(stk[i]);
    ans.push_back(np);
    return 1;
  }
  stk[++top] = np;
  for (auto &x : v[np]) {
    if (x == fath) continue;
    if (deg[x] % 3 == 2 && visit[x]) continue;
    if (dfs3(x, np)) return 1;
  }
  top--;
  return 0;
}
void solve() {
  scanf("%d%d", &n, &m);
  top = 0;
  fill(deg + 1, deg + n + 1, 0);
  fill(vis + 1, vis + n + 1, 0);
  fill(visit + 1, visit + n + 1, 0);
  for (int i = 1; i <= n; i++) v[i].clear();
  ans.clear();
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &s[i], &e[i]);
    deg[s[i]]++;
    deg[e[i]]++;
    v[s[i]].push_back(e[i]);
    v[e[i]].push_back(s[i]);
  }
  if (n == 1) {
    puts("No");
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (deg[i] % 3 == 0) {
      puts("Yes");
      printf("%d\n", n - 1);
      for (int j = 1; j <= n; j++)
        if (j != i) printf("%d ", j);
      puts("");
      return;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (deg[i] % 3 == 2 && !vis[i]) {
      if (dfs(i, 0)) {
        if (ans.size() == n)
          puts("No");
        else {
          fill(vis + 1, vis + n + 1, 0);
          puts("Yes");
          printf("%d\n", n - ans.size());
          for (auto &x : ans) vis[x] = 1;
          for (int j = 1; j <= n; j++)
            if (!vis[j]) printf("%d ", j);
          puts("");
        }
        return;
      }
    }
  }
  fill(vis + 1, vis + n + 1, 0);
  int cnt1 = 0;
  for (int i = 1; i <= n; i++)
    if (deg[i] % 3 == 1) cnt1++;
  for (int i = 1; i <= n; i++) sort(v[i].begin(), v[i].end());
  if (cnt1 >= 2) {
    for (int i = 1; i <= n; i++) {
      if (deg[i] % 3 == 1) {
        dfs2(i, 0);
        if (ans.size() == n)
          puts("No");
        else {
          puts("Yes");
          fill(vis + 1, vis + n + 1, 0);
          printf("%d\n", n - ans.size());
          for (auto &x : ans) vis[x] = 1;
          for (int j = 1; j <= n; j++)
            if (!vis[j]) printf("%d ", j);
          puts("");
        }
        return;
      }
    }
  } else {
    for (int i = 1; i <= n; i++) {
      if (deg[i] % 3 == 1) {
        dfs3(i, 0);
        if (ans.size() == n)
          puts("No");
        else {
          puts("Yes");
          fill(vis + 1, vis + n + 1, 0);
          printf("%d\n", n - ans.size());
          for (auto &x : ans) vis[x] = 1;
          for (int j = 1; j <= n; j++)
            if (!vis[j]) printf("%d ", j);
          puts("");
        }
        return;
      }
    }
  }
}
int main() {
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
