#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;
vector<int> cir;
int c[N], frm[N], all;
void dfs(int u, int f) {
  if (cir.size() && cir.size() < n) return;
  dfn[u] = ++tim, c[u] = all;
  for (int v : H[u])
    if (v != f) {
      if (!dfn[v])
        frm[v] = u, dfs(v, u);
      else if (dfn[v] < dfn[u]) {
        if (cir.size() && cir.size() < n) return;
        vector<int> z;
        for (int x = u; x != v; x = frm[x]) z.push_back(x);
        z.push_back(v);
        swap(cir, 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], FLAG;
int e[N];
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;
int fa[N], TIME;
vector<int> S;
void cope(int u, int f) {
  if (FLAG) return;
  S.push_back(u);
  if (ex[u] && f) {
    for (int z : S) Ans.push_back(z);
    FLAG = true;
    return;
  }
  for (int v : H[u])
    if (v != f) fa[v] = u, 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;
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && !dfn[i]) {
      cir.clear(), S.clear();
      ++all, dfs(i, 0);
      if (!cir.size()) continue;
      out(cir);
      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;
  Ans.clear();
  static bool ck[N];
  memset(ck, 0, sizeof(bool) * (all + 1));
  Ans.clear();
  for (int z : G[pt])
    if (!ck[c[z]]) {
      S.clear();
      FLAG = false, 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;
}
