#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read() {
  T f = 0, x = 0;
  char c = getchar();
  while (!isdigit(c)) f = c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + c - 48, c = getchar();
  return f ? -x : x;
}
namespace run {
const int N = 2e6 + 9;
int n, m, head[N], nex[N], to[N], cnt, deg[N], fa[N];
inline void add(int u, int v) {
  nex[++cnt] = head[u];
  head[u] = cnt, to[cnt] = v;
}
inline int get(int x) { return x == fa[x] ? x : fa[x] = get(fa[x]); }
struct Edge {
  int u, v;
  explicit Edge() {}
  Edge(int _u, int _v) : u(_u), v(_v) {}
} ed[N];
int vis[N], dep[N], par[N], Pc = 0;
inline void dfs(int u, int _f) {
  par[u] = _f, dep[u] = dep[_f] + 1, vis[u] = 1;
  for (int i = head[u]; i; i = nex[i])
    if (to[i] ^ _f) {
      if (!vis[to[i]])
        dfs(to[i], u);
      else if (dep[u] > dep[to[i]]) {
        if (dep[u] - dep[to[i]] + 1 != n) {
          while (u != par[to[i]]) vis[u] = 2, u = par[u];
          Pc = 1;
        }
      }
      if (Pc) return;
    }
}
inline void dfs1(int u, int _f) {
  deg[u] = dep[_f] + 1, par[u] = _f, vis[u] = 1;
  if (_f && deg[u] == 1 && dep[u] + 1 != n) {
    while (u != 0) vis[u] = 2, u = par[u];
    return Pc = 1, void();
  }
  for (int i = head[u]; i; i = nex[i]) {
    if (to[i] ^ _f) {
      if (!vis[to[i]]) dfs1(to[i], u);
      if (Pc) return;
    }
  }
}
int st[N], top, rt = 0;
inline bool dfs2(int u, int _f) {
  vis[u] = 1;
  for (int i = head[u]; i; i = nex[i])
    if (to[i] ^ _f) {
      if (to[i] == rt) {
        st[++top] = u;
        return 1;
      }
      if (!vis[to[i]])
        if (dfs2(to[i], u)) {
          st[++top] = u;
          return 1;
        }
    }
  return 0;
}
int tmp, pos;
int main() {
  int T = read<int>();
  while (T--) {
    n = read<int>(), m = read<int>();
    cnt = 0;
    for (int i = 1; i <= n; i++) vis[i] = deg[i] = 0, fa[i] = i, head[i] = 0;
    for (int i = 1; i <= m; i++) {
      int u = read<int>(), v = read<int>();
      deg[u]++, deg[v]++, ed[i] = Edge(u, v);
    }
    int Z = 0;
    for (int i = 1; i <= n; i++) {
      deg[i] %= 3;
      if (!deg[i] && n > 1) {
        puts("Yes");
        printf("%d\n", n - 1);
        for (int j = 1; j <= n; j++)
          if (i != j) printf("%d ", j);
        puts("");
        goto end;
      }
      Z += (deg[i] == 1);
    }
    for (int i = 1; i <= m; i++) {
      if (deg[ed[i].u] == 1 && deg[ed[i].v] == 1 && n > 2) {
        puts("Yes");
        printf("%d\n", n - 2);
        for (int j = 1; j <= n; j++)
          if (j != ed[i].u && j != ed[i].v) printf("%d ", j);
        puts("");
        goto end;
      } else if (deg[ed[i].u] == 2 && deg[ed[i].v] == 2)
        add(ed[i].u, ed[i].v), add(ed[i].v, ed[i].u);
    }
    Pc = 0, dfs(1, 0);
    if (Pc) {
      vector<int> a;
      a.clear();
      for (int i = 1; i <= n; i++)
        if (vis[i] != 2) a.push_back(i);
      puts("Yes");
      printf("%d\n", (int)a.size());
      for (int i = 0; i < a.size(); i++) printf("%d ", a[i]);
      puts("");
      goto end;
    }
    if (Z > 1) {
      for (int i = 1; i <= n; i++)
        if (deg[i] == 1) dfs1(i, 0);
      for (int i = 1; i <= n; i++) vis[i] = 0;
      if (Pc) {
        vector<int> a;
        a.clear();
        for (int i = 1; i <= n; i++)
          if (vis[i] != 2) a.push_back(i);
        puts("Yes");
        printf("%d\n", (int)a.size());
        for (int i = 0; i < a.size(); i++) printf("%d ", a[i]);
        puts("");
        goto end;
      }
    } else if (Z == 1) {
      pos = 0;
      for (int i = 1; i <= n; i++) {
        head[i] = 0;
        if (deg[i] == 1) assert(pos == 0), pos = i;
      }
      if (pos) {
        cnt = 0;
        for (int i = 1; i <= m; i++)
          if (deg[ed[i].u] == 2 && deg[ed[i].v] == 2) {
            add(ed[i].u, ed[i].v), add(ed[i].v, ed[i].u);
            fa[get(ed[i].u)] = get(ed[i].v);
          }
        tmp = 0;
        for (int i = 1; i <= n; i++)
          if (deg[i] == 2) {
            if (!tmp)
              tmp = get(i), add(pos, i);
            else if (tmp != get(i)) {
              add(pos, i);
              break;
            }
          }
        for (int i = 1; i <= n; i++)
          if (ed[i].u == pos || ed[i].v == pos) {
            if (ed[i].u == pos)
              add(ed[i].v, pos);
            else
              add(ed[i].u, pos);
          }
        assert(tmp);
        for (int i = 1; i <= n; i++) vis[i] = 0;
        rt = pos, top = 0, dfs2(pos, 0), dfs2(pos, 0);
        if (top - 1 != n) {
          puts("Yes");
          for (int i = 1; i <= top; i++) vis[st[i]] = 2;
          printf("%d\n", n - (top - 1));
          for (int i = 1; i <= n; i++)
            if (vis[i] != 2) printf("%d ", i);
          puts("");
          goto end;
        }
      }
    }
    puts("No");
  end:;
  }
  return 0;
}
}  // namespace run
int main() { return run::main(); }
