#include <bits/stdc++.h>
using namespace std;
const int N = 5000 * 100 + 5;
int n, m, a, b, c, av, bv, cv, t, h[N], cnt, par[N], y, ans[N], cntA, col,
    ca[N];
vector<int> adj[N];
bool mark[N], vis[N], flag2;
void bfs(int v) {
  queue<int> q;
  par[v] = -1;
  q.push(v);
  flag2 = false;
  while (q.size() && !flag2) {
    v = q.front();
    q.pop();
    for (auto u : adj[v])
      if (!par[u]) {
        par[u] = v, q.push(u);
        if (adj[u].size() % 3 == 1 && !flag2) y = u, flag2 = true;
      }
  }
}
void dfs(int v) {
  ca[v] = col;
  for (auto u : adj[v])
    if (!ca[u] && u != bv) dfs(u);
}
void dfs2(int v, int p = -1) {
  ans[cntA++] = v;
  int l = 0;
  bool flag = false;
  cnt = 0;
  for (auto u : adj[v])
    if (h[u] > h[l] && u != p) l = u;
  if (!cnt && l)
    for (int i = 0; i < cntA; i++) {
      if (l == ans[i]) flag = true;
      if (flag) mark[ans[i]] = true, cnt++;
    }
  for (auto u : adj[v])
    if (!cnt && !h[u] && adj[u].size() % 3 == 2)
      h[u] = h[v] + 1, dfs2(u, v), ans[--cntA] = 0;
}
void dfs3(int v, int co, int p = -1) {
  vis[v] = true;
  ans[cntA++] = v;
  for (auto u : adj[v])
    if (u == bv && u != p) flag2 = true;
  for (auto u : adj[v])
    if (!flag2 && !vis[u] && co == ca[u]) {
      dfs3(u, co, v);
      if (!flag2) ans[--cntA] = 0;
    }
}
int main() {
  cin >> t;
  for (int o = 1; o <= t; o++) {
    cin >> n >> m;
    for (int i = 0, v, u; i < m; i++) {
      cin >> v >> u;
      adj[v].push_back(u);
      adj[u].push_back(v);
    }
    for (int i = 1; i <= n; i++) {
      if (adj[i].size() % 3 == 0)
        a++, av = i;
      else if (adj[i].size() % 3 == 1)
        b++, bv = i;
      else
        c++, cv = i;
    }
    if (a) {
      if (n == 1)
        cout << "NO\n";
      else {
        cout << "YES\n" << n - 1 << '\n';
        for (int i = 1; i <= n; i++)
          if (i != av) cout << i << ' ';
      }
    } else if (b > 1) {
      bfs(bv);
      while (par[y] != -1) mark[y] = true, y = par[y], cntA++;
      mark[y] = true, cntA++;
      if (cntA == n)
        cout << "NO\n";
      else {
        cout << "YES\n" << n - cntA << '\n';
        for (int i = 1; i <= n; i++)
          if (!mark[i]) cout << i << ' ';
        cout << '\n';
      }
    } else {
      h[cv] = 1, fill(ans, ans + cntA, 0), cntA = 0;
      dfs2(cv);
      if (cnt == n)
        cout << "NO\n";
      else if (cnt) {
        cout << "YES\n" << n - cnt << '\n';
        for (int i = 1; i <= n; i++)
          if (!mark[i]) cout << i << ' ';
        cout << '\n';
      } else if (!cnt) {
        fill(vis, vis + n + 1, false);
        bool flag = true;
        if (b != 1) flag = false;
        if (flag && adj[bv].size() < 4) flag = false;
        if (flag) {
          fill(ans, ans + cntA, 0), cntA = 0, flag2 = false, col = 1;
          for (int i = 1; i < n; i++)
            if (i != bv && !ca[i]) dfs(i), col++;
          dfs3(bv, 1);
          fill(ans, ans + cntA, 0), cntA = 0, flag2 = false;
          dfs3(bv, 2);
          for (int i = 1; i <= n; i++) {
            if (vis[i]) cnt++;
          }
          cout << "YES\n" << n - cnt << '\n';
          for (int i = 1; i <= n; i++)
            if (!vis[i]) cout << i << ' ';
          cout << '\n';
        } else
          cout << "NO\n";
      }
    }
    for (int i = 0; i <= n; i++)
      adj[i].clear(), h[i] = par[i] = 0, vis[i] = mark[i] = false, ans[i] = 0;
    a = b = c = av = bv = cv = 0, cnt = 0, y = 0, flag2 = false, cntA = 0;
  }
}
