#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int T, n, m, i, j, x, y, g[N];
vector<int> e[N];
inline void out(vector<int> v) {
  static bool b[N];
  memset(b + 1, 0, n);
  for (int x : v) b[x] = 1;
  for (int x : v) {
    int d = 0;
    for (int y : e[x]) d += b[y];
    if (d % 3 != e[x].size() % 3) {
      assert(0);
    }
  }
  printf("Yes\n%d\n", n - (int)v.size());
  for (int i = 1; i <= n; ++i)
    if (!b[i]) printf("%d ", i);
  puts("");
}
inline vector<int> getpath(vector<int> v) {
  static int pre[N], q[N], dis[N];
  int t = 0, w = 1, i, y = v[1], x = v[0];
  q[1] = v[0];
  pre[v[0]] = -1;
  dis[v[0]] = 0;
  for (; t < w;) {
    int u = q[++t];
    for (int v : e[u])
      if (!pre[v]) dis[v] = dis[u] + 1, pre[v] = u, q[++w] = v;
  }
  for (i = 2; i < v.size(); ++i)
    if (dis[v[i]] < dis[y]) y = v[i];
  vector<int> ans;
  for (; ans.push_back(y), y != x; y = pre[y])
    ;
  for (i = 1; i <= w; ++i) pre[q[i]] = 0;
  return ans;
}
int gfa(int x) { return g[x] == x ? x : g[x] = gfa(g[x]); }
int fa[N], dep[N], mn, mx, my;
bool bb[N];
void dfs(int x) {
  for (int y : e[x])
    if (bb[y]) {
      if (!fa[y])
        fa[y] = x, dep[y] = dep[x] + 1, dfs(y);
      else if (dep[y] < dep[x] && y != fa[x] && dep[x] - dep[y] < mn)
        mn = dep[x] - dep[y], mx = x, my = y;
    }
}
inline bool ck_cir(vector<int> v) {
  int i;
  mn = 1 << 30;
  memset(bb + 1, 0, n);
  memset(fa + 1, 0, n << 2);
  for (int x : v) bb[x] = 1;
  for (int x : v)
    if (!fa[x]) fa[x] = -1, dep[x] = 0, dfs(x);
  return mn < 1 << 30;
}
int main() {
  scanf("%d", &T);
  for (; T--;) {
    scanf("%d%d", &n, &m);
    if (n == 1) {
      puts("No");
      continue;
    }
    for (i = 1; i <= n; ++i) e[i].clear();
    for (i = 1; i <= m; ++i)
      scanf("%d%d", &x, &y), e[x].push_back(y), e[y].push_back(x);
    for (i = 1; i <= n; ++i)
      if (e[i].size() % 3 == 0) break;
    if (i <= n) {
      out(vector<int>{i});
      continue;
    }
    vector<int> v1, v2;
    for (i = 1; i <= n; ++i)
      if (e[i].size() % 3 == 1)
        v1.push_back(i);
      else
        v2.push_back(i);
    if (v1.size() > 1) {
      v2 = getpath(v1);
      if (v2.size() == n) {
        puts("No");
        continue;
      }
      out(v2);
    } else if (ck_cir(v2)) {
      vector<int> v;
      for (; v.push_back(mx), my != mx; mx = fa[mx])
        ;
      if (v.size() == n) {
        puts("No");
        continue;
      }
      out(v);
    } else {
      static vector<int> vv[N];
      static bool bb[N];
      for (i = 1; i <= n; ++i) g[i] = i;
      memset(bb + 1, 0, n);
      for (i = 1; i <= n; ++i)
        if (i != v1[0]) {
          int j = 0;
          for (; j < e[i].size(); ++j)
            if (e[i][j] == v1[0]) break;
          if (j < e[i].size()) e[i].erase(e[i].begin() + j), bb[i] = 1;
          for (int x : e[i])
            if (x != v1[0]) g[gfa(x)] = gfa(i);
        }
      for (i = 1; i <= n; ++i) vv[i].clear();
      for (i = 1; i <= n; ++i)
        if (i != v1[0] && bb[i]) vv[gfa(i)].push_back(i);
      vector<int> v0 = {v1[0]};
      int s = 0;
      for (i = 1; i <= n; ++i)
        if (i != v1[0] && gfa(i) == i) {
          assert(vv[i].size() > 1);
          vector<int> v = getpath(vv[i]);
          if (s < 2) ++s, v0.insert(v0.end(), v.begin(), v.end());
        }
      if (v0.size() == n) {
        puts("No");
        continue;
      }
      out(v0);
    }
  }
  return 0;
}
