#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
vector<int> e[N];
int d[N];
bool seen[N];
int dfs2(int v, int p, vector<int>& bt) {
  seen[v] = 1;
  for (int u : e[v])
    if (d[u] == 2 && u != p) {
      if (seen[u]) {
        bt.push_back(v);
        return u;
      }
    }
  for (int u : e[v])
    if (d[u] == 2 && u != p) {
      int x = dfs2(u, v, bt);
      if (!x) continue;
      if (x > 0) bt.push_back(v);
      return x - v ? x : -1;
    }
  return 0;
}
bool dfs1(int v, int o, vector<int>& bt) {
  seen[v] = 1;
  for (int u : e[v])
    if (!seen[u]) {
      if (d[u] == 1 && u != o) {
        bt.push_back(u);
        bt.push_back(v);
        return 1;
      }
      if (dfs1(u, o, bt)) {
        bt.push_back(v);
        return 1;
      }
    }
  return 0;
}
int dsu[N];
int find(int v) { return dsu[v] < 0 ? v : dsu[v] = find(dsu[v]); }
void merge(int u, int v) {
  u = find(u), v = find(v);
  if (u == v) return;
  if (dsu[u] > dsu[v]) swap(u, v);
  dsu[u] += dsu[v];
  dsu[v] = u;
}
int dfsbut(int v, int i, vector<int>& bt) {
  seen[v] = 1;
  for (int u : e[v])
    if (!seen[u]) {
      if (u == abs(i)) {
        bt.push_back(v);
        if (i < 0)
          i = 0;
        else
          i = -i;
      }
      if (d[u] == 2) i = dfsbut(u, i, bt);
    }
  return i;
}
void ans(vector<int>& bt, int n) {
  if (bt.size() == n) {
    cout << "No\n";
    return;
  }
  cout << "Yes\n" << n - bt.size() << '\n';
  vector<bool> ok(n + 1, 1);
  for (int u : bt) ok[u] = 0;
  for (int i = 1; i <= (n); i++)
    if (ok[i]) cout << i << ' ';
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int t;
  cin >> t;
  for (int ti = 1; ti <= (t); ti++) {
    int n, m;
    cin >> n >> m;
    if (n == 1) {
      cout << "No\n";
      goto nextt;
    }
    for (int i = 1; i <= (n); i++) e[i].clear();
    for (int ei = 1; ei <= (m); ei++) {
      int a, b;
      cin >> a >> b;
      e[a].push_back(b);
      e[b].push_back(a);
    }
    for (int i = 1; i <= (n); i++) d[i] = e[i].size() % 3;
    for (int i = 1; i <= (n); i++)
      if (!d[i]) {
        cout << "Yes\n1\n" << i << '\n';
        goto nextt;
      }
    fill(seen, seen + n + 1, 0);
    for (int i = 1; i <= (n); i++)
      if (d[i] == 2 && !seen[i]) {
        vector<int> bt;
        if (dfs2(i, i, bt)) {
          ans(bt, n);
          goto nextt;
        }
      }
    fill(seen, seen + n + 1, 0);
    for (int i = 1; i <= (n); i++)
      if (d[i] == 1) {
        vector<int> bt;
        if (dfs1(i, i, bt)) {
          ans(bt, n);
          goto nextt;
        }
      }
    fill(dsu, dsu + n + 1, -1);
    for (int i = 1; i <= (n); i++)
      if (d[i] == 2)
        for (int j : e[i])
          if (d[j] == 2) merge(i, j);
    fill(seen, seen + n + 1, 0);
    for (int i = 1; i <= (n); i++)
      if (d[i] == 1) {
        int wl = 0, wr = 0;
        vector<int> mem;
        for (int u : e[i]) {
          u = find(u);
          if (seen[u]) {
            if (wl == u) continue;
            if (!wl)
              wl = u;
            else {
              wr = u;
              break;
            }
          } else {
            seen[u] = 1;
            mem.push_back(u);
          }
        }
        for (int u : mem) seen[u] = 0;
        if (wr) {
          vector<int> bt;
          dfsbut(wl, i, bt);
          dfsbut(wr, i, bt);
          bt.push_back(i);
          ans(bt, n);
          goto nextt;
        }
      }
    assert(0);
  nextt:;
  }
}
