#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 100;
int t, n, m, root, want;
bool done, mark[N];
vector<int> vec, vec_dfs, comp, nei[N];
vector<vector<int>> all;
void print(vector<int> X = vec) {
  done = true;
  sort(X.begin(), X.end());
  cout << "YES\n" << n - X.size() << '\n';
  for (int v = 0; v < n; v++)
    if (binary_search(X.begin(), X.end(), v) == false) cout << v + 1 << ' ';
  cout << '\n';
}
void dfs_2(int v, int par = -1) {
  comp.push_back(v);
  vec_dfs.push_back(v);
  mark[v] = true;
  for (int u : nei[v])
    if ((u != root) && (u ^ par)) {
      if (mark[u] == false)
        dfs_2(u, v);
      else {
        for (int i = 0;; i++)
          if (vec_dfs[i] == u) {
            for (int j = i; j < vec_dfs.size(); j++) vec.push_back(vec_dfs[j]);
            break;
          }
        done = true;
      }
      if (done) return;
    }
  vec_dfs.pop_back();
}
void input() {
  done = false;
  vec.clear();
  cin >> n >> m;
  for (int i = 0; i < n; i++) nei[i].clear();
  while (m--) {
    int u, v;
    cin >> u >> v;
    nei[--u].push_back(--v);
    nei[v].push_back(u);
  }
  for (int i = 0; i < n; i++) sort(nei[i].begin(), nei[i].end());
}
void find_0() {
  for (int i = 0; i < n; i++)
    if (nei[i].size() % 3 == 0) {
      print(vector<int>{i});
      return;
    }
}
void get_path(int v) {
  if (v == want) {
    done = true;
    vec.push_back(v);
    return;
  }
  mark[v] = true;
  for (int u : nei[v])
    if ((nei[u].size() % 3 == 2 || u == want) && mark[u] == false) {
      get_path(u);
      if (done) {
        vec.push_back(v);
        return;
      }
    }
}
void get_path_121(int v, int root) {
  if (nei[v].size() % 3 == 1 && v != root) {
    done = true;
    vec.push_back(v);
    return;
  }
  mark[v] = true;
  for (int u : nei[v])
    if (mark[u] == false) {
      get_path_121(u, root);
      if (done) {
        vec.push_back(v);
        return;
      }
    }
}
void find_121() {
  for (int v = 0; v < n; v++)
    if (nei[v].size() % 3 == 1) {
      get_path_121(v, v);
      if (done && vec.size() != n)
        print();
      else
        done = false, vec.clear();
      break;
    }
}
vector<int> f(vector<int> comp) {
  vector<int> vec;
  for (int x : comp)
    if (binary_search(nei[root].begin(), nei[root].end(), x)) vec.push_back(x);
  return vec;
}
void add(int u, int v) {
  fill(mark, mark + n, false);
  done = false;
  want = v;
  get_path(u);
}
void solve() {
  input();
  if (n <= 3) {
    cout << "NO\n";
    return;
  }
  find_0();
  if (done) return;
  find_121();
  if (done) return;
  for (int i = 0; i < n; i++)
    if (nei[i].size() % 3 == 1) root = i;
  want = -1;
  all.clear();
  fill(mark, mark + n, false);
  for (int v : nei[root])
    if (mark[v] == false) {
      comp.clear();
      vec_dfs.clear();
      dfs_2(v);
      if (done) {
        print();
        return;
      }
      all.push_back(comp);
    }
  if (all.size() < 2) {
    cout << "NO\n";
    return;
  }
  vector<int> a = f(all[0]), b = f(all[1]);
  if (max(a.size(), max(b.size(), all.size())) == 2) {
    cout << "NO\n";
    return;
  }
  vec = {root};
  add(a[0], a[1]);
  add(b[0], b[1]);
  print();
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> t;
  while (t--) solve();
}
