#include <bits/stdc++.h>
using namespace std;
const long long N = 5e5 + 10, LOG = 8, M = 1e2 + 10, INF = 1e18 + 10, sn = 320,
                MOD = 1e9 + 7;
void db(string s) { cout << s << "<" << endl; }
void di(int n) { cout << n << "<" << endl; }
vector<int> adj[N], e[N], finally;
bool vis[N], ar1[N], ar2[N];
int prv[N], c[N], u[N], v[N], sad[N], n, m;
int find(int u) {
  if (sad[u] ^ u) sad[u] = find(sad[u]);
  return sad[u];
}
bool join(int u, int v) {
  u = find(u);
  v = find(v);
  if (u == v) return 1;
  sad[u] = v;
  return 0;
}
queue<int> q;
int d[N];
void bfs(int v) {
  for (int i = 1; i <= n; i++) d[i] = MOD;
  d[v] = 0;
  q.push(v);
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    for (auto newi : adj[cur])
      if (d[newi] > d[cur] + 1) {
        d[newi] = d[cur] + 1;
        prv[newi] = cur;
        if (c[newi] ^ 1) q.push(newi);
      }
  }
}
vector<int> f1, f2;
void dfs(int v) {
  if (f1.size() == 1 && sad[v] == sad[f1[0]] && v ^ f1[0] && ar1[v])
    f1.push_back(v);
  if (f2.size() == 1 && sad[v] == sad[f2[0]] && v ^ f2[0] && ar1[v])
    f2.push_back(v);
  for (auto cur : adj[v])
    if (!vis[cur] && c[cur] == 2) {
      vis[cur] = 1;
      prv[cur] = v;
      dfs(cur);
    }
}
int par[N], c1, c2;
void dfs1(int ver, int p) {
  vis[ver] = 1;
  for (auto cur : adj[ver]) {
    if (cur == p || c[cur] ^ 2)
      continue;
    else if (vis[cur] && d[cur] < d[ver]) {
      if (c1 == -1)
        c1 = cur, c2 = ver;
      else if (d[cur] > d[c1] || d[cur] == d[c1] && d[ver] < d[c2])
        c1 = cur, c2 = ver;
    } else if (!vis[cur]) {
      d[cur] = d[ver] + 1;
      par[cur] = ver;
      dfs1(cur, ver);
    }
  }
}
void something(int x) {
  dfs1(x, 0);
  while (c2 ^ c1) {
    finally.push_back(c2);
    c2 = par[c2];
  }
  finally.push_back(c1);
  sort(finally.begin(), finally.end());
  reverse(finally.begin(), finally.end());
  for (auto cur : finally) ar1[cur] = 1;
  int cnt = 0;
  for (int i = 1; i <= m; i++)
    if (ar1[u[i]] && ar1[v[i]]) cnt++;
  cout << n - finally.size() << '\n';
  for (int j = 1; j <= n; j++)
    if (!finally.empty() && j == finally.back())
      finally.pop_back();
    else
      cout << j << ' ';
  cout << '\n';
}
void pain() {
  cin >> n >> m;
  c1 = c2 = -1;
  f1.clear();
  f2.clear();
  for (int i = 1; i <= n; i++) {
    adj[i].clear();
    e[i].clear();
    vis[i] = ar1[i] = par[i] = d[i] = 0;
  }
  for (int i = 1; i <= m; i++) {
    cin >> u[i] >> v[i];
    adj[u[i]].push_back(v[i]);
    adj[v[i]].push_back(u[i]);
  }
  for (int i = 1; i <= n; i++) c[i] = adj[i].size() % 3;
  bool b = 1;
  for (int i = 1; i <= n; i++)
    if (adj[i].size() > 2) b = 0;
  if (b) {
    cout << "No\n";
    return;
  }
  finally.clear();
  for (int i = 1; i <= n; i++) {
    if (c[i] == 0) {
      cout << "Yes\n" << n - 1 << '\n';
      for (int j = 1; j <= n; j++)
        if (i ^ j) cout << j << ' ';
      cout << '\n';
      return;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (c[u[i]] == 1 && c[v[i]] == 1) {
      cout << "Yes\n" << n - 2 << '\n';
      for (int j = 1; j <= n; j++)
        if (u[i] ^ j && v[i] ^ j) cout << j << ' ';
      cout << '\n';
      return;
    }
  }
  for (int i = 1; i <= n; i++) sad[i] = i;
  for (int i = 1; i <= m; i++) {
    if (c[u[i]] == 1 || c[v[i]] == 1) continue;
    if (join(u[i], v[i])) {
      cout << "Yes\n";
      something(u[i]);
      return;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (c[u[i]] == 1)
      e[find(v[i])].push_back(u[i]);
    else if (c[v[i]] == 1)
      e[find(u[i])].push_back(v[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (c[i] == 1) continue;
    sort(e[i].begin(), e[i].end());
    e[i].erase(unique(e[i].begin(), e[i].end()), e[i].end());
    if (e[i].size() >= 2) {
      vis[e[i][0]] = 1;
      bfs(e[i][0]);
      while (e[i][1] ^ e[i][0]) {
        finally.push_back(e[i][1]);
        e[i][1] = prv[e[i][1]];
      }
      finally.push_back(e[i][0]);
      sort(finally.begin(), finally.end());
      reverse(finally.begin(), finally.end());
      cout << "Yes\n" << n - finally.size() << '\n';
      for (int j = 1; j <= n; j++) {
        if (!finally.empty() && j == finally.back())
          finally.pop_back();
        else
          cout << j << ' ';
      }
      cout << '\n';
      return;
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) cnt += (c[i] == 1);
  for (int i = 1; i <= n; i++) {
    if (c[i] ^ 1) continue;
    for (auto cur : adj[i]) {
      ar1[cur] = 1;
      if (f1.empty())
        f1.push_back(cur);
      else if (f2.empty() && sad[f1[0]] ^ sad[cur])
        f2.push_back(cur);
    }
    vis[f1[0]] = vis[f2[0]] = 1;
    dfs(f1[0]);
    dfs(f2[0]);
    while (f1[1] ^ f1[0]) {
      finally.push_back(f1[1]);
      f1[1] = prv[f1[1]];
    }
    finally.push_back(f1[0]);
    while (f2[1] ^ f2[0]) {
      finally.push_back(f2[1]);
      f2[1] = prv[f2[1]];
    }
    finally.push_back(f2[0]);
    finally.push_back(i);
    sort(finally.begin(), finally.end());
    reverse(finally.begin(), finally.end());
    if (finally.size() == n) {
      cout << "No\n";
      return;
    }
    cout << "Yes\n" << n - finally.size() << '\n';
    for (int j = 1; j <= n; j++) {
      if (!finally.empty() && j == finally.back())
        finally.pop_back();
      else
        cout << j << ' ';
    }
    cout << '\n';
    return;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int azab;
  cin >> azab;
  while (azab--) pain();
  cin >> n;
}
