#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
bool ans[N];
struct edg {
  int u, t;
} e[N];
int t, n, m;
vector<int> v[N];
namespace sub1 {
bool main() {
  for (int i = 1; i <= n; i++)
    if (v[i].size() % 3 == 0) {
      puts("Yes");
      ans[i] = 1;
      return 1;
    }
  return 0;
}
}  // namespace sub1
namespace sub2 {
bool main() {
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < v[i].size(); j++) {
      if (v[v[i][j]].size() % 3 == 1 && v[i].size() % 3 == 1) {
        puts("Yes");
        ans[v[i][j]] = 1, ans[i] = 1;
        return 1;
      }
    }
  return 0;
}
}  // namespace sub2
namespace sub3 {
int f[N], q[N], st[N], pre[N];
vector<int> w[N];
bool og, fl[N];
int find(int u) {
  if (f[u] == u) return f[u];
  return f[u] = find(f[u]);
}
void getit() {
  int a = st[1], b = st[2];
  q[q[0] = 1] = a;
  for (int i = 1; i <= n; i++) pre[i] = -1;
  pre[a] = 0;
  for (int i = 1; i <= q[0]; i++) {
    int x = q[i];
    for (int j = 0; j < v[x].size(); j++) {
      if (v[v[x][j]].size() % 3 == 1 || (x == a && v[x][j] == b)) continue;
      int c = v[x][j];
      if (pre[c] == -1) pre[c] = x, q[++q[0]] = c;
    }
  }
  ans[b] = 1, ans[a] = 1;
  while (b != a) b = pre[b], ans[b] = 1;
}
void dfs1(int u, int x) {
  fl[u] = 1;
  if (u == x && st[0] < n) {
    puts("Yes"), og = 1, getit();
    return;
  }
  for (int i = 0; i < w[u].size(); i++)
    if (!fl[w[u][i]]) st[++st[0]] = w[u][i], dfs1(w[u][i], x), st[0]--;
}
bool main() {
  int x = 0, y = 0;
  og = 0;
  for (int i = 1; i <= n; i++)
    if (v[i].size() % 3 == 1) {
      if (x == 0)
        x = i;
      else
        y = i;
    }
  for (int i = 1; i <= n; i++) f[i] = i, w[i].resize(0), fl[i] = 0;
  st[0] = 0;
  for (int i = 1; i <= m; i++) {
    int a = e[i].u, b = e[i].t;
    if (v[a].size() % 3 != 2) continue;
    if (v[b].size() % 3 != 2) continue;
    if (a == x || b == x) continue;
    if (find(a) == find(b)) {
      st[++st[0]] = a, dfs1(a, b);
      if (og) return 1;
    } else {
      w[a].push_back(b), w[b].push_back(a), f[find(a)] = find(b);
    }
  }
  return 0;
}
}  // namespace sub3
namespace sub4 {
int a, b, c, f1[N], pos[N], fa[N];
inline void dfs(int u, int k) {
  if (f1[u]) pos[u] = u;
  fa[u] = k;
  for (int i = 0; i < v[u].size(); i++) {
    int x = v[u][i];
    if (v[x].size() % 3 == 1 || x == k) continue;
    dfs(x, u);
    if (f1[x]) {
      if (f1[u] != f1[x] && f1[u]) {
        a = pos[u], b = pos[x], c = u;
      } else if (f1[u] == 0)
        f1[u] = f1[x], pos[u] = pos[x];
    }
  }
}
bool main() {
  a = 0, b = 0, c = 0;
  int s1 = 0, s2 = 0;
  for (int i = 1; i <= n; i++) f1[i] = 0, fa[i] = 0;
  for (int i = 1; i <= n; i++) {
    if (v[i].size() % 3 == 1) continue;
    s1++;
    for (int j = 0; j < v[i].size(); j++)
      if (v[v[i][j]].size() % 3 == 2) s2++;
  }
  s2 /= 2;
  if (s1 <= s2) return 0;
  for (int i = 1; i <= n; i++) {
    if (v[i].size() % 3 == 1) continue;
    for (int j = 0; j < v[i].size(); j++)
      if (v[v[i][j]].size() % 3 == 1) {
        if (f1[i]) {
          if (n == 3) return 0;
          puts("Yes");
          ans[v[i][j]] = 1, ans[i] = 1, ans[f1[i]] = 1;
          return 1;
        }
        f1[i] = v[i][j];
      }
  }
  for (int i = 1; i <= n; i++)
    if (!fa[i] && v[i].size() % 3 == 2) dfs(i, 0);
  if (a > 0 && b > 0 && c > 0) {
    ans[c] = 1;
    ans[f1[a]] = 1, ans[f1[b]] = 1;
    while (a != c) ans[a] = 1, a = fa[a];
    while (b != c) ans[b] = 1, b = fa[b];
    int cnt = 0;
    for (int i = 1; i <= n; i++)
      if (ans[i]) cnt++;
    if (cnt == n) return 0;
    puts("Yes");
    return 1;
  }
  return 0;
}
}  // namespace sub4
namespace sub5 {
int x, y, z, st[N];
bool fg, ft[N], fl[N];
void dfs1(int u) {
  fl[u] = 1;
  int c = v[u].size();
  for (int i = 0; i < v[u].size(); i++) {
    if (v[u][i] == z) {
      c--;
      continue;
    }
    if (!fl[v[u][i]]) dfs1(v[u][i]);
  }
  if (c == 1) {
    if (!x)
      x = u;
    else
      y = u;
  }
}
void dfs2(int u, int fa) {
  if (st[0] > 1) {
    if (fg) return;
    bool fl = 0;
    for (int i = 0; i < v[u].size(); i++)
      if (v[u][i] == z) fl = 1;
    if (fl) {
      for (int i = 1; i <= st[0]; i++) ft[st[i]] = 1;
      fg = 1;
    }
  }
  for (int i = 0; i < v[u].size(); i++) {
    int x = v[u][i];
    if (x == fa || x == z) continue;
    st[++st[0]] = x, dfs2(x, u), st[0]--;
  }
}
bool main() {
  int a = 0, b = 0, s1 = 0, s2 = 0;
  fg = 0;
  for (int i = 1; i <= n; i++) {
    fl[i] = 0, ft[i] = 0;
    if (v[i].size() % 3 == 1) {
      if (a == 0)
        a = i;
      else
        b = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (v[i].size() % 3 == 1) continue;
    s1++;
    for (int j = 0; j < v[i].size(); j++)
      if (v[v[i][j]].size() % 3 == 2) s2++;
  }
  s2 /= 2;
  if (s1 <= s2) return 0;
  if (b > 0 || a == 0) return 0;
  z = a;
  fl[z] = 1;
  ft[z] = 1;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (fl[i]) continue;
    x = 0, y = 0, dfs1(i), fg = 0;
    st[++st[0]] = x, dfs2(x, 0), st[0]--;
    cnt++;
    if (cnt == 2) break;
  }
  cnt = 0;
  for (int i = 1; i <= n; i++)
    if (ft[i]) cnt++;
  if (cnt == n) return 0;
  puts("Yes");
  for (int i = 1; i <= n; i++)
    if (ft[i]) ans[i] = 1;
  return 1;
}
}  // namespace sub5
inline void solve() {
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!ans[i]) cnt++;
  printf("%d\n", cnt);
  for (int i = 1; i <= n; i++)
    if (!ans[i])
      printf("%d ", i);
    else
      ans[i] = 0;
  puts("");
}
int main() {
  cin >> t;
  int ct = 0;
  while (t--) {
    scanf("%d%d", &n, &m);
    int a, b;
    for (int i = 1; i <= n; i++) v[i].resize(0);
    for (int i = 1; i <= m; i++)
      scanf("%d%d", &e[i].u, &e[i].t), v[e[i].u].push_back(e[i].t),
          v[e[i].t].push_back(e[i].u);
    ct++;
    if (n == 1 || n == 2) {
      puts("No");
      continue;
    }
    if (sub1::main()) {
      solve();
      continue;
    }
    if (sub2::main()) {
      solve();
      continue;
    }
    if (sub3::main()) {
      solve();
      continue;
    }
    if (sub4::main()) {
      solve();
      continue;
    }
    if (sub5::main()) {
      solve();
      continue;
    }
    puts("No");
  }
}
