#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int parent[N], degree[N], h[N];
bool visited[N], good[N];
vector<int> adj[N];
queue<int> q = queue<int>();
int n, m, root, mx;
bool has_3k_vertex();
bool has_121_path();
bool has_2_cycle();
bool has_122_components();
bool dfs1(int u);
void dfs2(int u);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  for (cin >> t; t; --t) {
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
      int u, v;
      cin >> u >> v;
      degree[--u]++, degree[--v]++;
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    for (root = 0; root < n && degree[root] % 3 != 1; root++)
      ;
    if (has_3k_vertex() or (root < n and has_121_path()) or has_2_cycle() or
        (root < n and degree[root] > 4 and has_122_components())) {
      vector<int> vect = vector<int>();
      for (int i = 0; i < n; ++i) {
        if (not good[i]) {
          vect.push_back(i + 1);
        }
      }
      cout << "Yes" << '\n' << vect.size() << '\n';
      for (auto v : vect) {
        cout << v << " ";
      }
      cout << '\n';
    } else {
      cout << "No" << '\n';
    }
    for (int j = 0; j < n; ++j) {
      adj[j].clear();
      visited[j] = good[j] = false;
      parent[j] = degree[j] = h[j] = 0;
    }
  }
  return 0;
}
bool has_122_components() {
  bool flag = false;
  for (int i = 0; i < n; ++i) {
    visited[i] = false;
  }
  visited[root] = good[root] = true;
  sort(adj[root].begin(), adj[root].end(),
       [](int a, int b) -> bool { return h[a] < h[b]; });
  for (auto u : adj[root]) {
    if (not visited[u] and h[u] > 1) {
      int v = u;
      good[u] = true;
      while (parent[v] != root) {
        v = parent[v];
        good[v] = true;
      }
      if (flag) break;
      dfs2(v);
      flag = true;
    }
  }
  return true;
}
bool has_2_cycle() {
  parent[root < n ? root : 0] = -1;
  for (int i = 0; i < n; ++i) {
    visited[i] = false;
  }
  return dfs1(root < n ? root : 0);
}
bool dfs1(int u) {
  mx = -1;
  visited[u] = true;
  for (auto v : adj[u])
    if (visited[v] and h[v] < h[u] - 1 and (mx == -1 or h[v] > h[mx])) mx = v;
  if (mx != -1 and h[u] - h[mx] + 1 < n and degree[mx] % 3 > 1) {
    for (; u != parent[mx]; u = parent[u]) good[u] = true;
    return true;
  }
  for (auto v : adj[u]) {
    if (not visited[v]) {
      parent[v] = u;
      h[v] = h[u] + 1;
      if (dfs1(v)) return true;
    }
  }
  return false;
}
void dfs2(int u) {
  visited[u] = true;
  for (auto v : adj[u])
    if (not visited[v]) dfs2(v);
}
bool has_121_path() {
  parent[root] = -1;
  visited[root] = true;
  q.push(root);
  for (; !q.empty(); q.pop()) {
    int u = q.front();
    if (u != root and degree[u] % 3 == 1 and h[u] < n - 1) {
      for (; u != -1; good[u] = true, u = parent[u])
        ;
      for (; !q.empty(); q.pop())
        ;
      return true;
    }
    for (auto v : adj[u]) {
      if (not visited[v]) {
        visited[v] = true;
        q.push(v);
        parent[v] = u;
        h[v] = h[u] + 1;
      }
    }
  }
  return false;
}
bool has_3k_vertex() {
  for (int i = 0; i < n; ++i) {
    if (degree[i] % 3 == 0 and n > 1) {
      good[i] = true;
      return true;
    }
  }
  return false;
}
