#include <bits/stdc++.h>
using namespace std;
template <typename T>
void debug_out(T t) {
  cerr << t;
}
template <typename A, typename B>
void debug_out(pair<A, B> u) {
  cerr << "(" << u.first << " " << u.second << ")";
}
template <typename T>
void debug_out(vector<T> t) {
  int sz = t.size();
  for (int i = 0; i < sz; i++) {
    debug_out(t[i]);
    if (i != sz - 1) cerr << ", ";
  }
}
template <typename T>
void debug_out(vector<vector<T>> t) {
  int sz = t.size();
  for (int i = 0; i < sz; i++) {
    debug_out(t[i]);
    if (i != sz - 1) cerr << endl;
  }
}
int tt;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> tt;
  while (tt--) {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> g(n);
    for (int i = 0; i < m; i++) {
      int u, v;
      cin >> u >> v;
      u--;
      v--;
      g[u].push_back(v);
      g[v].push_back(u);
    }
    vector<vector<int>> deg(3);
    for (int i = 0; i < n; i++) deg[g[i].size() % 3].push_back(i);
    if (deg[0].empty() && deg[1].empty() && m == n) {
      cout << "No" << endl;
      continue;
    }
    vector<int> res;
    if (!deg[0].empty()) {
      res.push_back(deg[0][0]);
      goto B;
    }
    if (deg[1].size() > 1) {
      vector<int> par(n, -1);
      vector<int> was(n);
      int u = deg[1][0];
      vector<int> que;
      que.push_back(u);
      was[u] = 1;
      for (int b = 0; b < (int)que.size(); b++) {
        for (int v : g[que[b]]) {
          if (was[v]) continue;
          was[v] = 1;
          par[v] = que[b];
          que.push_back(v);
          if (g[v].size() % 3 == 1) goto A;
        }
      }
    A:;
      int v = que.back();
      while (~v) {
        res.push_back(v);
        v = par[v];
      }
    } else {
      vector<int> cur;
      vector<int> was(n);
      if (!deg[1].empty()) was[deg[1][0]] = 1;
      vector<int> q(n);
      vector<int> dep(n);
      function<bool(int)> dfs = [&](int v) {
        if (was[v]) return false;
        was[v] = 1;
        int st = -1;
        for (int u : g[v]) {
          if ((cur.empty() || u != cur.back()) && q[u] &&
              (st == -1 || dep[u] > dep[st]))
            st = u;
        }
        if (~st) {
          res.push_back(v);
          while (cur.back() != st) {
            res.push_back(cur.back());
            cur.pop_back();
          }
          res.push_back(st);
          return true;
        }
        dep[v] = cur.size();
        cur.push_back(v);
        q[v] = 1;
        for (int u : g[v]) {
          if (dfs(u)) return true;
        }
        cur.pop_back();
        q[v] = 0;
        return false;
      };
      for (int i : deg[2])
        if (dfs(i)) break;
      if (res.empty()) {
        assert(!deg[1].empty());
        int one = deg[1][0];
        vector<int> ps(n);
        vector<int> sub(n);
        vector<int> par(n, -1);
        vector<int> in(n);
        vector<int> out(n);
        vector<int> tour;
        for (int i : g[one]) ps[i] = sub[i] = 1;
        function<void(int, int)> dfs2 = [&](int v, int p) {
          par[v] = p;
          in[v] = tour.size();
          tour.push_back(v);
          for (int u : g[v]) {
            if (u == one || u == p) continue;
            dfs2(u, v);
            sub[v] += sub[u];
          }
          out[v] = tour.size();
        };
        int cnt = 0;
        vector<int> scc(n);
        for (int i : deg[2])
          if (par[i] == -1) {
            int st = tour.size();
            dfs2(i, -1);
            cnt++;
            for (int j = st; j < (int)tour.size(); j++) scc[tour[j]] = cnt;
          }
        int sz = g[one].size();
        auto path = [&](int x, int y) {
          vector<int> sx, sy;
          while (~x) {
            sx.push_back(x);
            x = par[x];
          }
          while (~y) {
            sy.push_back(y);
            y = par[y];
          }
          while (!sx.empty() && !sy.empty() && sx.back() == sy.back()) {
            int sv = sx.back();
            sx.pop_back();
            sy.pop_back();
            if (!(!sx.empty() && !sy.empty() && sx.back() == sy.back())) {
              sx.push_back(sv);
              break;
            }
          }
          for (int i : sy) sx.push_back(i);
          return sx;
        };
        if (cnt > 1) {
          int a = -1, b = -1, c = -1, d = -1;
          sort(g[one].begin(), g[one].end(),
               [&](int x, int y) { return in[x] < in[y]; });
          for (int v : g[one]) {
            if (scc[v] == 1) {
              if (a == -1)
                a = v;
              else if (b == -1)
                b = v;
            }
            if (scc[v] == 2) {
              if (c == -1)
                c = v;
              else if (d == -1)
                d = v;
            }
          }
          res.push_back(one);
          vector<int> l = path(a, b);
          vector<int> r = path(c, d);
          for (int i : l) res.push_back(i);
          for (int i : r) res.push_back(i);
          goto B;
        }
        int c = -1;
        for (int i : deg[2]) {
          if (par[i] == -1) continue;
          if (sub[c] <= 1 || sub[c] >= sz - 1) continue;
          c = i;
          break;
        }
        assert(~c);
        vector<int> l, r;
        for (int i = 0; i < (int)tour.size(); i++) {
          if (ps[tour[i]]) {
            (i >= in[c] && i < out[c] ? l : r).push_back(tour[i]);
          }
        }
        sort(l.begin(), l.end(), [&](int x, int y) { return in[x] < in[y]; });
        sort(r.begin(), r.end(), [&](int x, int y) { return in[x] < in[y]; });
        l.resize(unique(l.begin(), l.end()) - l.begin());
        r.resize(unique(r.begin(), r.end()) - r.begin());
        res.push_back(one);
        l = path(l[0], l[1]);
        r = path(r[0], r[1]);
        for (int i : l) res.push_back(i);
        for (int i : r) res.push_back(i);
      }
    }
  B:;
    vector<int> alive(n);
    for (int i : res) alive[i] = 1;
    res.clear();
    for (int i = 0; i < n; i++)
      if (!alive[i]) res.push_back(i);
    if (res.empty()) {
      cout << "No" << endl;
      continue;
    }
    cout << "Yes\n";
    cout << res.size() << endl;
    for (int i : res) cout << i + 1 << " ";
    cout << endl;
  }
  return 0;
}
