#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int nm = 0;
  bool fh = true;
  char cw = getchar();
  for (; !isdigit(cw); cw = getchar()) fh ^= (cw == '-');
  for (; isdigit(cw); cw = getchar()) nm = nm * 10 + (cw - '0');
  return fh ? nm : -nm;
}
int n, m, S[600020], top, tmp, fs[600020], nt[600020 << 1], to[600020 << 1],
    u[600020], v[600020], d[600020], dep[600020], ok[600020], fa[600020];
int q[600020], hd, tl, sc[600020], TM, las[600020], w[600020];
inline bool solve0(int x = 1) {
  while (x <= n && d[x]) ++x;
  if (x > n) return false;
  for (int i = 1; i <= n; i++)
    if (i ^ x) S[++top] = i;
  return true;
}
inline void build(int x) {
  dep[x] = 1, hd = tl = 0, q[tl++] = x, sc[x] = x;
  for (x = q[hd]; hd < tl; x = q[++hd])
    for (int i = fs[x]; (d[x] > 1 || hd == 0) && i != -1; i = nt[i])
      if (!dep[to[i]])
        dep[to[i]] = dep[x] + 1, fa[to[i]] = x, q[tl++] = to[i],
        sc[to[i]] = ((dep[to[i]] <= 2) ? to[i] : sc[x]);
}
inline void link(int x, int y) { nt[tmp] = fs[x], fs[x] = tmp, to[tmp++] = y; }
inline bool solve2() {
  for (int x = 1; x <= n; x++) dep[x] = fa[x] = 0, fs[x] = -1;
  tmp = 0;
  for (int i = 1; i <= m; i++)
    if (d[u[i]] == 2 && d[v[i]] == 2) link(u[i], v[i]), link(v[i], u[i]);
  for (int i = 1; i <= n; ok[i] = 1, i++)
    if (d[i] == 2 && !dep[i]) build(i);
  for (int i = 1; i <= m; i++)
    if (d[u[i]] == 2 && d[v[i]] == 2) {
      int x = u[i], y = v[i];
      if (dep[x] < dep[y]) swap(x, y);
      if (fa[x] == y) continue;
      if (dep[x] + dep[y] - 1 == n && sc[x] != sc[y]) continue;
      for (; x != y; ok[x] = 0, x = fa[x])
        if (dep[x] < dep[y]) swap(x, y);
      ok[x] = 0;
      for (int k = 1; k <= n; k++)
        if (ok[k]) S[++top] = k;
      return true;
    }
  return false;
}
inline bool solve121() {
  for (int i = 1; i <= n; fs[i] = -1, fa[i] = 0, dep[i] = 0, w[i] = 0, i++)
    ;
  for (int i = 1; i <= m; i++) link(u[i], v[i]), link(v[i], u[i]);
  for (int i = 1; i <= n; i++) ok[i] = 1, dep[i] = fa[i] = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) {
      build(i);
      for (int y = i + 1; y <= n; y++)
        if (d[y] == 1 && dep[y] > 1 && dep[y] < n) {
          while (ok[i]) ok[y] = 0, y = fa[y];
          for (int k = 1; k <= n; k++)
            if (ok[k]) S[++top] = k;
          return true;
        }
      return false;
    }
  return false;
}
int f[600020];
inline int fd(int x) { return x == f[x] ? x : f[x] = fd(f[x]); }
inline bool solvebtf() {
  for (int x = 1; x <= n; f[x] = x, x++)
    w[x] = 0, ok[x] = 1, dep[x] = fa[x] = 0, fs[x] = -1;
  tmp = 0;
  for (int i = 1; i <= m; i++)
    if (d[u[i]] == 2 && d[v[i]] == 2)
      link(u[i], v[i]), link(v[i], u[i]), f[fd(u[i])] = fd(v[i]);
  int abt = 0, K = 0, t1, t2;
  for (int i = 1; i <= n; i++) K += (d[i] == 1);
  if (!K) return false;
  for (int i = 1; i <= m; i++) abt += (d[u[i]] + d[v[i]] == 3);
  if (abt == 4 && m == n + 1 && K == 1) return false;
  for (int i = 1; i <= m; i++)
    if (d[u[i]] + d[v[i]] == 3) {
      if (d[u[i]] > d[v[i]]) swap(u[i], v[i]);
      link(u[i], v[i]);
    }
  K = -1;
  for (int x = 1; x <= n; x++, ++TM)
    if (d[x] == 1) {
      int CNT = 0;
      for (int i = fs[x]; i != -1; las[fd(to[i])] = TM, i = nt[i]) {
        if (las[fd(to[i])] < TM) las[fd(to[i])] = TM, w[fd(to[i])] = 0;
        if ((++w[fd(to[i])]) != 2) continue;
        ++CNT, t1 = t2, t2 = to[i];
      }
      if (CNT < 2) continue;
      K = x;
      break;
    }
  if (K == -1) return false;
  build(t1), build(t2), ok[K] = 0;
  for (int x = 1; x <= n; x++) w[x] = 0;
  int ans1 = n + 1, ans2 = n + 1, k1, k2;
  for (int i = fs[K]; i != -1; i = nt[i]) w[to[i]] = 1;
  for (int x = 1; x <= n; x++) {
    if (fd(x) == fd(t1) && dep[x] > 1 && dep[x] < ans1) k1 = x, ans1 = dep[x];
    if (fd(x) == fd(t2) && dep[x] > 1 && dep[x] < ans2) k2 = x, ans2 = dep[x];
  }
  while (k1) ok[k1] = 0, k1 = fa[k1];
  while (k2) ok[k2] = 0, k2 = fa[k2];
  for (int x = 1; x <= n; x++)
    if (ok[x]) S[++top] = x;
  return true;
}
inline bool solve() {
  n = read(), m = read(), top = tmp = 0;
  for (int i = 1; i <= n; i++) fs[i] = -1, d[i] = 0, dep[i] = 0;
  for (int i = 1; i <= m; i++)
    (++d[u[i] = read()]) %= 3, (++d[v[i] = read()]) %= 3;
  if (n == 1) return false;
  if (solve0()) return true;
  if (solve2()) return true;
  if (solve121()) return true;
  if (solvebtf()) return true;
  return false;
}
int main() {
  for (int Cas = read(); Cas; --Cas) {
    if (!solve()) {
      puts("No");
      continue;
    }
    puts("Yes");
    printf("%d\n", top);
    for (int i = 1; i <= top; i++) printf("%d%c", S[i], i < top ? ' ' : '\n');
  }
  return 0;
}
