#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 50;
int T, n, m;
vector<int> G[N], H[N];
int d[N], dfn[N], tim;
int c[N], dep[N], frm[N], all;
int len, L, R;
void dfs(int u, int f) {
  dfn[u] = ++tim, c[u] = all;
  dep[u] = dep[f] + 1;
  for (int v : H[u])
    if (v != f) {
      if (!dfn[v])
        frm[v] = u, dfs(v, u);
      else if (dfn[v] < dfn[u]) {
        int z = dep[u] - dep[v] + 1;
        if (!len || z < len) L = u, R = v, len = z;
      }
    }
}
void out(vector<int> ans) {
  static bool tmp[N];
  memset(tmp, 0, sizeof(bool) * (n + 1));
  for (int t : ans) tmp[t] = true;
  ans.clear();
  for (int i = 1; i <= n; i++)
    if (!tmp[i]) ans.push_back(i);
  puts("Yes");
  cout << ans.size() << '\n';
  for (int z : ans) cout << z << " ";
  puts("");
}
bool ex[N], lll;
int e[N], FLAG;
bool bfs(int u) {
  queue<int> q;
  q.push(u), e[u] = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    if (d[x] == 1 && e[x]) {
      vector<int> ans;
      ans.push_back(u);
      for (int z = x; z != u; z = frm[z]) ans.push_back(z);
      if (ans.size() == n) return puts("No"), true;
      return out(ans), true;
    }
    for (int v : G[x])
      if (e[v] == -1) e[v] = e[frm[v] = x] + 1, q.push(v);
  }
  return false;
}
vector<int> Ans, S;
void cope(int u, int f) {
  if (lll) return;
  if (FLAG >= 2) return;
  S.push_back(u);
  if (ex[u] && f) {
    for (int z : S) Ans.push_back(z);
    ++FLAG;
    lll = true;
    return;
  }
  for (int v : H[u])
    if (v != f) cope(v, u);
  S.pop_back();
}
void Main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) G[i].clear();
  for (int i = 1, u, v; i <= m; i++)
    scanf("%d%d", &u, &v), G[u].push_back(v), G[v].push_back(u);
  for (int i = 1; i <= n; i++) d[i] = G[i].size() % 3;
  if (n == 1) return puts("No"), void();
  for (int i = 1; i <= n; i++)
    if (d[i] == 0) {
      vector<int> t;
      t.push_back(i);
      return out(t), void();
    }
  bool ok = true;
  for (int i = 1; i <= n; i++) ok &= G[i].size() == 2;
  if (ok) return puts("No"), void();
  for (int i = 1; i <= n; i++) H[i].clear();
  for (int i = 1; i <= n; i++)
    if (d[i] == 2)
      for (int v : G[i])
        if (d[v] == 2) H[i].push_back(v);
  memset(dfn, 0, (n + 1) << 2), all = 0, tim = len = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && !dfn[i]) {
      ++all, dfs(i, 0);
      if (len) {
        vector<int> ans;
        for (int t = L; t != R; t = frm[t]) ans.push_back(t);
        ans.push_back(R);
        out(ans);
        return;
      }
    }
  memset(e, -1, (n + 1) << 2);
  for (int i = 1; i <= n; i++)
    if (d[i] == 1 && bfs(i)) return;
  memset(ex, 0, sizeof(bool) * (n + 1));
  int pt = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) pt = i;
  for (int z : G[pt]) ex[z] = true;
  static bool ck[N];
  memset(ck, 0, sizeof(bool) * (all + 1));
  Ans.clear(), FLAG = 0;
  for (int z : G[pt])
    if (!ck[c[z]]) {
      S.clear(), lll = 0;
      ck[c[z]] = true;
      cope(z, 0);
    }
  Ans.push_back(pt);
  if (Ans.size() == n) return puts("No"), void();
  out(Ans);
}
int main() {
  cin >> T;
  while (T--) Main();
  return 0;
}
