#include <bits/stdc++.h>
using namespace std;
int n, m, Deg[501000], vis[501000], par[501000], MM[501000], TP[501000];
vector<int> E[501000], F[501000];
void Print(int a, int pp) {
  int i;
  for (i = 1; i <= n; i++) MM[i] = 0;
  int cc = 0;
  MM[a] = ++cc;
  TP[cc] = a;
  while (1) {
    int t = par[a];
    MM[t] = ++cc;
    TP[cc] = t;
    int Mx = -1;
    for (auto &x : F[t]) {
      if (MM[x] && x != a) {
        Mx = max(Mx, MM[x]);
      }
    }
    if (Mx != -1) {
      for (i = 1; i <= n; i++) MM[i] = 0;
      for (i = Mx; i <= cc; i++) {
        MM[TP[i]] = 1;
      }
      vector<int> RR;
      for (i = 1; i <= n; i++)
        if (!MM[i]) RR.push_back(i);
      if (RR.size() == n) {
        puts("No");
        return;
      }
      puts("Yes");
      printf("%d\n", RR.size());
      for (auto &t : RR) printf("%d ", t);
      puts("");
      return;
    }
    a = par[a];
  }
}
bool DFS(int a, int pp) {
  vis[a] = 1;
  par[a] = pp;
  for (auto &x : F[a]) {
    if (x == pp) continue;
    if (vis[x]) {
      Print(a, x);
      return true;
    }
    if (DFS(x, a)) return true;
  }
  return false;
}
void Solve() {
  int i, a, b;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) E[i].clear(), F[i].clear();
  for (i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    E[a].push_back(b);
    E[b].push_back(a);
  }
  for (i = 1; i <= n; i++) Deg[i] = E[i].size();
  if (n == 1) {
    puts("No");
    return;
  }
  for (i = 1; i <= n; i++) {
    if (E[i].size() % 3 == 0) {
      puts("Yes");
      printf("%d\n", n - 1);
      for (int j = 1; j <= n; j++) {
        if (j != i) printf("%d ", j);
      }
      puts("");
      return;
    }
  }
  if (n == 2) {
    puts("No");
    return;
  }
  for (i = 1; i <= n; i++) {
    for (auto &t : E[i]) {
      if (Deg[i] % 3 == 2 && Deg[t] % 3 == 2) {
        F[i].push_back(t);
      }
      if (Deg[i] % 3 == 1 && Deg[t] % 3 == 1) {
        puts("Yes");
        printf("%d\n", n - 2);
        for (int j = 1; j <= n; j++) {
          if (j != i && j != t) printf("%d ", j);
        }
        puts("");
        return;
      }
    }
  }
  for (i = 1; i <= n; i++) vis[i] = 0, par[i] = 0;
  for (i = 1; i <= n; i++) {
    if (!vis[i] && Deg[i] % 3 == 2) {
      if (DFS(i, 0)) {
        return;
      }
    }
  }
  puts("No");
}
int main() {
  int TC;
  scanf("%d", &TC);
  while (TC--) {
    Solve();
  }
}
