#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int t, n, m, root, d[N], p[N], h[N];
bool mark[N], good[N];
vector<int> adj[N];
queue<int> q;
bool dfs1(int u) {
  int mx = -1;
  mark[u] = true;
  for (auto v : adj[u])
    if (mark[v] && h[v] < h[u] - 1 && (!~mx || h[v] > h[mx])) mx = v;
  if (~mx && h[u] - h[mx] + 1 < n && d[mx] % 3 > 1) {
    for (; u ^ p[mx]; u = p[u]) good[u] = true;
    return true;
  }
  for (auto v : adj[u])
    if (!mark[v]) {
      h[v] = h[p[v] = u] + 1;
      if (dfs1(v)) return true;
    }
  return false;
}
void dfs2(int u) {
  mark[u] = true;
  for (auto v : adj[u])
    if (!mark[v]) dfs2(v);
}
bool have_3k_vertex() {
  for (int u = 0; u < n; u++)
    if (d[u] % 3 < 1 && n > 1) return good[u] = true;
  return false;
}
bool have_121_path() {
  for (p[root] = -1, mark[root] = true, q.push(root); !q.empty(); q.pop()) {
    int u = q.front();
    if (u ^ root && d[u] % 3 == 1 && h[u] < n - 1) {
      for (; ~u; good[u] = true, u = p[u])
        ;
      for (; !q.empty(); q.pop())
        ;
      return true;
    }
    for (auto v : adj[u])
      if (!mark[v]) q.push(v), mark[v] = true, h[v] = h[p[v] = u] + 1;
  }
  return false;
}
bool have_2_cycle() {
  return p[root < n ? root : 0] = -1, fill(mark, mark + n, false),
                             dfs1(root < n ? root : 0);
}
bool have_122_components() {
  bool flag = false;
  fill(mark, mark + n, flag), mark[root] = good[root] = true,
                              sort(adj[root].begin(), adj[root].end(),
                                   [](int u, int v) { return h[u] < h[v]; });
  for (auto u : adj[root])
    if (!mark[u] && h[u] > 1) {
      int v = u;
      for (good[u] = true; p[v] ^ root; good[v = p[v]] = true)
        ;
      if (flag) break;
      dfs2(v), flag = true;
    }
  return true;
}
int main() {
  for (cin >> t; t--;) {
    for (cin >> n >> m; m--;) {
      int u, v;
      cin >> u >> v;
      d[--u]++, d[--v]++;
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    for (root = 0; root < n && d[root] % 3 ^ 1; root++)
      ;
    if (have_3k_vertex() || (root < n && have_121_path()) || have_2_cycle() ||
        (root < n && d[root] > 4 && have_122_components())) {
      vector<int> vec;
      for (int u = 0; u < n; u++)
        if (!good[u]) vec.push_back(u);
      cout << "Yes " << vec.size() << ' ';
      for (auto u : vec) cout << ++u << ' ';
    } else
      cout << "No ";
    for (int u = 0; u < n; u++)
      d[u] = h[u] = 0, adj[u].clear(), mark[u] = good[u] = false;
  }
}
