#include <bits/stdc++.h>
const int MN = 5e5 + 100;
int n, m, deg[MN], depth[MN], parent[MN], t, q[MN], pred[MN];
std::vector<int> graph[MN];
std::vector<int> mod[3];
bool dfs(int v) {
  bool r = 0;
  for (int u : graph[v])
    if (parent[v] != u && deg[u] % 3 == 2) {
      if (depth[u]) {
        t = t ? t : v;
        r = 1;
      } else {
        depth[u] = depth[v] + 1, parent[u] = v;
        r |= dfs(u);
      }
    }
  return r;
}
bool forest(void) {
  bool r = 1;
  for (int v : mod[2])
    if (!depth[v]) {
      parent[v] = -1;
      depth[v] = 1;
      if (dfs(v)) r = 0;
    }
  return r;
}
std::vector<int> keep;
void answer(void) {
  std::sort(keep.begin(), keep.end());
  if (keep.size() == n)
    printf("No\n");
  else {
    printf("Yes\n%d\n", n - keep.size());
    for (int i = 1, j = 0, k = n - keep.size(); k; --k, ++i) {
      for (; i <= n && j < keep.size() && keep[j] == i; ++i, ++j)
        ;
      printf("%d%c", i, " \n"[k == 1]);
    }
  }
  keep.clear();
}
void solve(void) {
  scanf("%d%d", &n, &m);
  for (int i = 0, u, v; i < m; ++i) {
    scanf("%d%d", &u, &v);
    graph[u].push_back(v);
    graph[v].push_back(u);
    deg[u]++;
    deg[v]++;
  }
  for (int i = 1; i <= n; ++i) mod[deg[i] % 3].push_back(i);
  if (n == 1)
    printf("No\n");
  else if (!mod[0].empty()) {
    int x = mod[0][0];
    printf("Yes\n%d\n", n - 1);
    for (int i = 1; i < n; ++i) printf("%d%c", i + (i >= x), " \n"[i + 1 == n]);
  } else if (!forest()) {
    int x, y = 0;
    for (int u : graph[t])
      if (u != parent[t] && depth[u])
        if (depth[t] > depth[u] && depth[u] > y) {
          x = u;
          y = depth[u];
        }
    keep.push_back(x);
    keep.push_back(t);
    for (int i = parent[t], w, z; i != x; i = w) {
      keep.push_back(i);
      z = depth[i];
      for (int u : graph[i])
        if (z > depth[u] && depth[u] >= y) {
          w = u;
          z = depth[u];
        }
    }
    answer();
  } else if (mod[1].empty())
    printf("No\n");
  else if (mod[1].size() >= 2) {
    pred[mod[1][0]] = -1;
    q[0] = mod[1][0];
    int t = 0;
    for (int i = 0, j = 1, k = q[0]; i < j; k = q[++i]) {
      if (i && deg[k] % 3 == 1) {
        t = k;
        break;
      }
      for (int v : graph[k])
        if (!pred[v]) {
          pred[v] = k;
          q[j++] = v;
        }
    }
    for (int i = t; ~i; i = pred[i]) {
      keep.push_back(i);
    }
    answer();
  } else {
    keep.push_back(mod[1][0]);
    int last = 0;
    int fst = graph[mod[1][0]][0];
    pred[fst] = -1;
    q[0] = fst;
    for (int i = 0, j = 1, k = q[0]; i < j; k = q[++i])
      for (int v : graph[k])
        if (!pred[v]) {
          if (v == mod[1][0])
            last = (last || !i) ? last : k;
          else {
            pred[v] = k;
            q[j++] = v;
          }
        }
    for (int i = last; ~i; i = pred[i]) {
      keep.push_back(i);
    }
    last = 0;
    for (int v : graph[mod[1][0]]) {
      if (!pred[v]) {
        fst = v;
        break;
      }
    }
    pred[fst] = -1;
    q[0] = fst;
    for (int i = 0, j = 1, k = q[0]; i < j; k = q[++i])
      for (int v : graph[k])
        if (!pred[v]) {
          if (v == mod[1][0])
            last = (last || !i) ? last : k;
          else {
            pred[v] = k;
            q[j++] = v;
          }
        }
    for (int i = last; ~i; i = pred[i]) {
      keep.push_back(i);
    }
    answer();
  }
  for (int i = 1; i <= n; ++i) {
    graph[i].clear();
    deg[i] = 0;
    parent[i] = depth[i] = pred[i] = 0;
  }
  for (int i = 0; i < 3; ++i) mod[i].clear();
  t = 0;
}
int T;
int main(void) {
  scanf("%d", &T);
  for (int i = 1; i <= T; ++i) solve();
  return 0;
}
