#include <bits/stdc++.h>
using namespace std;
int T, n, m, deg[500010], s[500010], e[500010], fa[500010], stk[500010], top,
    tag[500010];
bool instk[500010], vis[500010];
vector<int> v[500010];
int rt;
bool dfs(int np, int fath, bool chk) {
  if (chk && deg[np] % 3 != 2) return 0;
  stk[++top] = np;
  instk[np] = 1;
  vis[np] = 1;
  for (auto &x : v[np]) {
    if (x == fath) continue;
    if (x == rt) return 1;
    if (!vis[x]) {
      if (dfs(x, np, 1)) return 1;
    }
  }
  instk[np] = 0;
  top--;
  return 0;
}
inline int getf(int x) { return x == fa[x] ? x : fa[x] = getf(fa[x]); }
void solve() {
  scanf("%d%d", &n, &m);
  fill(deg + 1, deg + n + 1, 0);
  fill(instk + 1, instk + n + 1, 0);
  fill(vis + 1, vis + n + 1, 0);
  fill(tag + 1, tag + n + 1, 0);
  top = 0;
  for (int i = 1; i <= n; i++) v[i].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]);
  }
  for (int i = 1; i <= n; i++) {
    if (deg[i] % 3 == 0) {
      if (n == 1)
        puts("No");
      else {
        puts("Yes");
        puts("1");
        for (int j = 1; j <= n; j++)
          if (i != j) printf("%d ", j);
        puts("");
      }
      return;
    }
  }
  for (int i = 1; i <= n; i++) fa[i] = i;
  for (int i = 1; i <= m; i++) {
    if ((deg[s[i]] % 3 == 2) && (deg[e[i]] % 3 == 2)) {
      int ti = getf(s[i]), tj = getf(e[i]);
      if (ti == tj) {
        rt = s[i];
        dfs(s[i], 0, 0);
        if (top == n)
          puts("No");
        else {
          puts("Yes");
          int cnt = 0;
          for (int j = 1; j <= n; j++)
            if (!instk[j]) cnt++;
          printf("%d\n", cnt);
          for (int j = 1; j <= n; j++)
            if (!instk[j]) printf("%d ", j);
          puts("");
        }
        return;
      }
      fa[ti] = tj;
    }
  }
  for (int i = 1; i <= n; i++) {
    if ((deg[i] % 3 == 1)) tag[i] = i;
  }
  for (int i = 1; i <= m; i++) {
    if ((deg[s[i]] % 3) > (deg[e[i]] % 3)) swap(s[i], e[i]);
    if (getf(s[i]) == getf(e[i])) continue;
    if (deg[s[i]] % 3 == 1 && deg[e[i]] % 3 == 2) {
      int ti = getf(e[i]);
      if (tag[ti]) {
        rt = tag[ti];
        dfs(s[i], 0, 0);
        if (top == n)
          puts("No");
        else {
          puts("Yes");
          int cnt = 0;
          for (int j = 1; j <= n; j++)
            if (!instk[j]) cnt++;
          printf("%d\n", cnt);
          for (int j = 1; j <= n; j++)
            if (!instk[j]) printf("%d ", j);
          puts("");
        }
        return;
      }
      fa[ti] = getf(s[i]);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (deg[i] % 3 == 1) {
      rt = i;
      break;
    }
  }
  dfs(rt, 0, 0);
  for (int i = 1; i <= n; i++) vis[i] &= instk[i];
  top = 0;
  dfs(rt, 0, 0);
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!instk[i]) cnt++;
  if (!cnt)
    puts("No");
  else {
    puts("Yes");
    printf("%d\n", cnt);
    for (int i = 1; i <= n; i++)
      if (!instk[i]) printf("%d ", i);
    puts("");
  }
}
int main() {
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}
