#include <bits/stdc++.h>
using namespace std;
bool f1, debug;
int n, m;
vector<int> adj[500001], e[500001];
bool vis[500001];
int prv[500001];
int c[500001];
int u[500001], v[500001];
int dsu[500001];
bool bobo[500001], coco[500001];
vector<int> ans;
int find(int x) {
  if (dsu[x] != x) dsu[x] = find(dsu[x]);
  return dsu[x];
}
bool join(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return true;
  dsu[x] = y;
  return false;
}
queue<int> q;
int d[500001];
void bfs(int x) {
  for (int i = 1; i <= n; i++) d[i] = 1e9;
  d[x] = 0;
  q.push(x);
  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> x1, x2;
void dfs2(int x) {
  if (x1.size() == 1 && dsu[x] == dsu[x1[0]] && x != x1[0] && bobo[x])
    x1.push_back(x);
  if (x2.size() == 1 && dsu[x] == dsu[x2[0]] && x != x2[0] && bobo[x])
    x2.push_back(x);
  for (auto cur : adj[x]) {
    if (!vis[cur] && c[cur] == 2) {
      vis[cur] = true;
      prv[cur] = x;
      dfs2(cur);
    }
  }
}
int par[500001];
int tae, tzu;
void dfs3(int id, int p) {
  vis[id] = true;
  for (auto cur : adj[id]) {
    if (cur == p)
      continue;
    else if (vis[cur] && d[cur] < d[id]) {
      if (tae == -1)
        tae = cur, tzu = id;
      else if (d[cur] > d[tae] || d[cur] == d[tae] && d[id] < d[tzu]) {
        tae = cur;
        tzu = id;
      }
    } else if (!vis[cur]) {
      d[cur] = d[id] + 1;
      par[cur] = id;
      dfs3(cur, id);
    }
  }
}
void magic(int x) {
  dfs3(x, 0);
  while (tzu != tae) {
    ans.push_back(tzu);
    tzu = par[tzu];
  }
  ans.push_back(tae);
  sort(ans.begin(), ans.end());
  reverse(ans.begin(), ans.end());
  for (auto cur : ans) bobo[cur] = true;
  int cnt = 0;
  for (int i = 1; i <= m; i++) {
    if (bobo[u[i]] && bobo[v[i]]) cnt++;
  }
  if (cnt != ans.size())
    while (true)
      ;
  cout << n - ans.size() << '\n';
  for (int j = 1; j <= n; j++) {
    if (!ans.empty() && j == ans.back())
      ans.pop_back();
    else
      cout << j << ' ';
  }
  cout << '\n';
}
void solve() {
  cin >> n >> m;
  tae = tzu = -1;
  x1.clear();
  x2.clear();
  for (int i = 1; i <= n; i++) {
    adj[i].clear();
    e[i].clear();
    vis[i] = false;
    bobo[i] = false;
    par[i] = 0;
    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]);
  }
  if (f1 && !debug) return;
  if (f1) {
    cout << n << ' ' << m << endl;
    for (int i = 1; i <= m; i++) cout << u[i] << ' ' << v[i] << endl;
  }
  for (int i = 1; i <= n; i++) {
    c[i] = adj[i].size() % 3;
  }
  bool bad = true;
  for (int i = 1; i <= n; i++) {
    if (adj[i].size() > 2) bad = false;
  }
  if (bad) {
    cout << "No\n";
    return;
  }
  ans.clear();
  int god = 0;
  for (int i = 1; i <= n; i++) {
    if (c[i] == 0) {
      cout << "Yes\n";
      cout << 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";
      cout << 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++) dsu[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";
      magic(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]] = true;
      bfs(e[i][0]);
      while (e[i][1] != e[i][0]) {
        ans.push_back(e[i][1]);
        e[i][1] = prv[e[i][1]];
      }
      ans.push_back(e[i][0]);
      sort(ans.begin(), ans.end());
      reverse(ans.begin(), ans.end());
      cout << "Yes\n";
      cout << n - ans.size() << '\n';
      for (int j = 1; j <= n; j++) {
        if (!ans.empty() && j == ans.back())
          ans.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]) {
      bobo[cur] = true;
      if (x1.empty())
        x1.push_back(cur);
      else if (x2.empty() && dsu[x1[0]] != dsu[cur])
        x2.push_back(cur);
    }
    vis[x1[0]] = vis[x2[0]] = true;
    dfs2(x1[0]);
    dfs2(x2[0]);
    while (x1[1] != x1[0]) {
      ans.push_back(x1[1]);
      x1[1] = prv[x1[1]];
    }
    ans.push_back(x1[0]);
    while (x2[1] != x2[0]) {
      ans.push_back(x2[1]);
      x2[1] = prv[x2[1]];
    }
    ans.push_back(x2[0]);
    ans.push_back(i);
    sort(ans.begin(), ans.end());
    reverse(ans.begin(), ans.end());
    if (ans.size() == n) {
      cout << "No\n";
      return;
    }
    cout << "Yes\n";
    cout << n - ans.size() << '\n';
    for (int j = 1; j <= n; j++) {
      if (!ans.empty() && j == ans.back())
        ans.pop_back();
      else
        cout << j << ' ';
    }
    cout << '\n';
    return;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  f1 = t == 34273;
  int cnt = 0;
  while (t--) {
    cnt++;
    if (cnt == 195)
      debug = true;
    else
      debug = false;
    solve();
    if (debug) return 0;
  }
}
