#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 5;
char buf[1 << 12], *pp1 = buf, *pp2 = buf, nc;
int ny;
inline char gc() {
  return pp1 == pp2 &&
                 (pp2 = (pp1 = buf) + fread(buf, 1, 1 << 12, stdin), pp1 == pp2)
             ? EOF
             : *pp1++;
}
inline int read() {
  int x = 0;
  for (ny = 1; nc = gc(), (nc < 48 || nc > 57) && nc != EOF;)
    if (nc == 45) ny = -1;
  if (nc < 0) return nc;
  for (x = nc - 48; nc = gc(), 47 < nc && nc < 58 && nc != EOF;
       x = (x << 3) + (x << 1) + (nc ^ 48))
    ;
  return x * ny;
}
int n, m, u[MAXN], v[MAXN], d[MAXN];
int vis[MAXN];
inline void Print(vector<int> ans) {
  if (ans.size() == n) return puts("No"), (void)0;
  for (int i = (1); i <= (n); i++) vis[i] = 0;
  puts("Yes");
  cout << n - (int)ans.size() << "\n";
  for (auto o : ans) vis[o] = 1;
  for (int i = (1); i <= (n); i++)
    if (!vis[i]) cout << i << " ";
  cout << '\n';
}
vector<int> G[MAXN], res, cnt1, R;
vector<pair<int, int> > S[MAXN];
int vis1[MAXN], vis2[MAXN], fa[MAXN], dep[MAXN], Rt[MAXN], rt;
inline vector<int> Get(int x, int y) {
  vector<int> a(0), b(0);
  int flg = 0;
  if (dep[x] < dep[y]) swap(x, y), flg = 1;
  for (; dep[x] > dep[y]; x = fa[x]) a.push_back(x);
  for (; x != y; x = fa[x], y = fa[y]) a.push_back(x), b.push_back(y);
  a.push_back(x);
  reverse(b.begin(), b.end());
  for (auto o : b) a.push_back(o);
  if (flg) reverse(a.begin(), a.end());
  return a;
}
inline void dfs1(int x, int f) {
  Rt[x] = rt, fa[x] = f, dep[x] = dep[f] + 1, vis1[x] = 1;
  int p = 0;
  for (auto y : G[x])
    if (y != f && vis1[y] && dep[y] < dep[x] && res.empty()) {
      if (!p || dep[y] > dep[p]) p = y;
    }
  if (p) res = Get(x, p);
  for (auto y : G[x])
    if (y != f && !vis1[y]) dfs1(y, x);
}
int vx[MAXN], vy[MAXN];
inline void solve(int x, vector<int> tmp, int y) {
  for (int i = (1); i <= (m); i++)
    if (u[i] == x) vx[v[i]] = 1;
  for (int i = (1); i <= (m); i++)
    if (u[i] == y) vy[v[i]] = 1;
  for (int i = 0; i < tmp.size(); i++)
    if (vy[tmp[i]]) {
      tmp.resize(i + 1);
      break;
    }
  reverse(tmp.begin(), tmp.end());
  vector<int> s(0);
  for (auto o : tmp) {
    s.push_back(o);
    if (vx[o]) break;
  }
  s.push_back(x), s.push_back(y);
  return Print(s);
}
inline bool dfs2(int x, int fa) {
  if (vx[x]) {
    R.push_back(x);
    return 1;
  }
  int t = 0;
  for (auto y : G[x])
    if (y != fa)
      if (dfs2(y, x)) {
        t = 1;
        break;
      }
  if (t) R.push_back(x);
  return t;
}
inline void solve(int x) {
  R.push_back(x);
  int t = 2;
  if (vx[x]) t--;
  for (auto y : G[x]) {
    if (dfs2(y, x)) t--;
    if (!t) break;
  }
}
inline void Solve() {
  n = read(), m = read();
  for (int i = (1); i <= (m); i++)
    u[i] = read(), v[i] = read(), d[u[i]]++, d[v[i]]++;
  for (int i = (1); i <= (n); i++)
    if (d[i] % 3 == 0) {
      vector<int> tmp(1);
      tmp[0] = i, Print(tmp);
      return;
    }
  for (int i = (1); i <= (m); i++)
    if (d[u[i]] % 3 == 1 && d[v[i]] % 3 == 1) {
      vector<int> tmp(2);
      tmp[0] = u[i], tmp[1] = v[i], Print(tmp);
      return;
    }
  for (int i = (1); i <= (m); i++)
    if (d[u[i]] % 3 == 2 && d[v[i]] % 3 == 2)
      G[u[i]].push_back(v[i]), G[v[i]].push_back(u[i]);
  for (int i = (1); i <= (n); i++)
    if (!vis1[i] && d[i] % 3 == 2) rt = i, dfs1(i, 0);
  if (res.size()) return Print(res);
  for (int i = (1); i <= (n); i++)
    if (d[i] % 3 == 1) cnt1.push_back(i);
  for (int i = (1); i <= (m); i++)
    if (d[u[i]] % 3 == 2 && d[v[i]] % 3 == 1) swap(u[i], v[i]);
  if (cnt1.size() > 1) {
    for (int i = (1); i <= (m); i++)
      if (d[u[i]] % 3 == 1 && d[v[i]] % 3 == 2)
        S[Rt[v[i]]].emplace_back(u[i], v[i]);
    for (int i = (1); i <= (n); i++) {
      sort(S[i].begin(), S[i].end());
      for (int j = 1; j < S[i].size(); j++)
        if (S[i][j - 1].first != S[i][j].first) {
          vector<int> tmp = Get(S[i][j].second, S[i][j - 1].second);
          return solve(S[i][j].first, tmp, S[i][j - 1].first);
        }
    }
  } else {
    for (int i = (1); i <= (m); i++)
      if (u[i] == cnt1[0]) vx[v[i]] = 1;
    R.push_back(cnt1[0]);
    int T = 2;
    for (int i = (1); i <= (n); i++)
      if (d[i] % 3 == 2) {
        if (!vis2[Rt[i]]) vis2[Rt[i]] = 1, solve(i), T--;
        if (!T) break;
      }
    Print(R);
  }
}
inline void Clear() {
  for (int i = (1); i <= (n); i++)
    d[i] = vx[i] = vy[i] = vis[i] = vis1[i] = vis2[i] = fa[i] = Rt[i] = dep[i] =
        0,
    G[i].clear(), S[i].clear();
  cnt1.clear(), res.clear(), R.clear();
  ;
}
int main() {
  for (int t = read(); t--;) Solve(), Clear();
  return 0;
}
