#include <bits/stdc++.h>
const int max_N = 1000005;
int t, n, m, deg[max_N], fa[max_N];
std::vector<int> Edge[max_N], vec;
bool vis[max_N], flag;
int read() {
  char c = getchar();
  int ans = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') ans = ans * 10 + c - '0', c = getchar();
  return ans;
}
void Write(int x) {
  if (x < 10)
    putchar(x + '0');
  else
    Write(x / 10), putchar(x % 10 + '0');
}
void putout() {
  for (int i = 1; i <= n; i++) vis[i] = false;
  for (auto i : vec) vis[i] = true;
  vec.clear();
  for (int i = 1; i <= n; i++)
    if (!vis[i]) vec.push_back(i);
  Write(vec.size()), putchar('\n');
  for (auto i : vec) Write(i), putchar(' ');
  putchar('\n');
}
void dfs1(int x) {
  vis[x] = true;
  if (flag) return;
  for (auto i : Edge[x])
    if (deg[i] % 3 == 2 && !flag) {
      if (fa[x] == i) continue;
      if (vis[i]) {
        flag = true;
        vec.push_back(i);
        for (int j = x; j != i; j = fa[j]) vec.push_back(j);
        if (vec.size() == n)
          puts("NO");
        else
          puts("YES"), putout();
      } else
        fa[i] = x, dfs1(i);
    }
}
void dfs2(int x, int fa, int p) {
  vec.push_back(x);
  for (auto i : Edge[x]) {
    if (i == fa || i == p || flag) continue;
    if (deg[i] % 3 == 1)
      puts("YES"), flag = true, vec.push_back(i), putout();
    else
      dfs2(i, x, p);
  }
  vec.pop_back();
}
void dfs3(int x, int fa) {
  vec.push_back(x);
  vis[x] = true;
  for (auto i : Edge[x]) {
    if (i == fa || flag) continue;
    if (deg[i] % 3 == 1)
      flag = true;
    else
      dfs3(i, x);
  }
  if (!flag) vec.pop_back();
}
void check() {
  n = read(), m = read();
  for (int i = 1, u, v; i <= m; i++)
    u = read(), v = read(), Edge[u].push_back(v), Edge[v].push_back(u),
    ++deg[u], ++deg[v];
  for (int i = 1; i <= n && !flag; i++)
    if (deg[i] % 3 == 0)
      flag = true, vec = std::vector<int>{i}, puts("YES"), putout();
  for (int i = 1; i <= n && !flag; i++)
    if (deg[i] % 3 == 2 && !vis[i]) dfs1(i);
  int cnt1 = 0, e = 0;
  for (int i = 1; i <= n && !flag; i++)
    if (deg[i] % 3 == 1) cnt1++, e = i;
  if (cnt1 > 1 && !flag) {
    for (int i = 1; i <= n && !flag; i++)
      if (deg[i] % 3 == 1) dfs2(i, 0, i);
  }
  if (cnt1 == 1 && !flag) {
    for (int i = 1; i <= n; i++) vis[i] = false;
    for (auto i : Edge[e]) {
      if (flag || vis[i]) continue;
      if (vec.empty())
        dfs3(i, e), assert(flag), flag = false;
      else
        dfs3(i, e);
    }
    puts("YES"), vec.push_back(e), putout();
  }
  assert(flag);
  flag = false, vec.clear();
  for (int i = 1; i <= n; i++)
    Edge[i].clear(), deg[i] = 0, vis[i] = false, fa[i] = 0;
}
int main() {
  t = read();
  while (t--) check();
  return 0;
}
