#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500010;
int N, M;
int A[MAXN], B[MAXN];
vector<int> ed[MAXN];
bool chk[MAXN];
int dep[MAXN];
int uni[MAXN], uo[MAXN], cnt[MAXN];
int w[MAXN], dis[MAXN];
int dfs(int x, int p, int u, int d) {
  chk[x] = true;
  uni[x] = u;
  dep[x] = d;
  int mx = 0;
  for (auto a : ed[x])
    if (a != p && chk[a] && dep[a] > dep[mx]) mx = a;
  if (mx) return mx;
  for (auto a : ed[x])
    if (!dep[a] && ed[a].size() % 3 == 2) {
      int t = dfs(a, x, u, d + 1);
      if (t) {
        if (t == -1) chk[x] = false;
        return t == x ? -1 : t;
      }
    }
  chk[x] = false;
  return 0;
}
void bfs(int x, int g) {
  memset(w + 1, 0, sizeof(int) * N);
  queue<int> q;
  q.push(x);
  w[x] = -1;
  dis[x] = 0;
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    for (auto a : ed[t])
      if (ed[a].size() % 3 == 2 && uni[a] == g && !w[a]) {
        w[a] = t;
        dis[a] = dis[t] + 1;
        q.push(a);
      }
  }
}
void path(int x) {
  for (; x != -1; x = w[x]) chk[x] = true;
}
void print() {
  int cnt = 0;
  for (int i = 1; i <= N; i++)
    if (!chk[i]) cnt++;
  if (cnt) {
    cout << "Yes\n" << cnt << "\n";
    for (int i = 1; i <= N; i++)
      if (!chk[i]) cout << i << " ";
    cout << "\n";
  } else
    cout << "No\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T;
  dis[0] = MAXN;
  cin >> T;
  while (T--) {
    bool ans = false;
    cin >> N >> M;
    for (int i = 0; i < M; i++) cin >> A[i] >> B[i];
    for (int i = 1; i <= N; i++) ed[i].clear();
    for (int i = 0; i < M; i++) {
      ed[A[i]].push_back(B[i]);
      ed[B[i]].push_back(A[i]);
    }
    for (int i = 1; i <= N; i++)
      if (ed[i].size() % 3 == 0) {
        memset(chk + 1, 0, sizeof(bool) * N);
        chk[i] = true;
        print();
        ans = true;
        break;
      }
    if (ans) continue;
    memset(chk + 1, 0, sizeof(bool) * N);
    memset(dep + 1, 0, sizeof(int) * N);
    for (int i = 1; i <= N; i++)
      if (!dep[i] && ed[i].size() % 3 == 2 && dfs(i, 0, i, 1)) {
        print();
        ans = true;
        break;
      }
    if (ans) continue;
    for (int i = 0; i < M; i++)
      if (ed[A[i]].size() % 3 == 1 && ed[B[i]].size() % 3 == 1) {
        memset(chk + 1, 0, sizeof(bool) * N);
        chk[A[i]] = chk[B[i]] = true;
        print();
        ans = true;
        break;
      }
    if (ans) continue;
    memset(uo + 1, 0, sizeof(int) * N);
    memset(cnt + 1, 0, sizeof(int) * N);
    for (int i = 1; i <= N; i++)
      if (ed[i].size() % 3 == 1) {
        for (auto a : ed[i])
          if (ed[a].size() % 3 == 2 && uo[uni[a]] != i) {
            if (uo[uni[a]]) {
              memset(chk + 1, 0, sizeof(bool) * N);
              bfs(uo[uni[a]], uni[a]);
              int mn = 0;
              for (auto b : ed[i])
                if (w[b] && dis[b] < dis[mn]) mn = b;
              path(mn);
              chk[i] = true;
              print();
              ans = true;
              break;
            }
            cnt[i]++;
            uo[uni[a]] = i;
          }
        if (ans) break;
      }
    if (ans) continue;
    memset(chk + 1, 0, sizeof(bool) * N);
    for (int i = 1; i <= N; i++)
      if (cnt[i] > 1) {
        int g = 0;
        for (auto a : ed[i])
          if (ed[a].size() % 3 == 2 && g != uni[a]) {
            bfs(a, uni[a]);
            int mn = 0;
            for (auto b : ed[i])
              if (b != a && w[b] && dis[b] < dis[mn]) mn = b;
            path(mn);
            if (g) {
              chk[i] = true;
              print();
              ans = true;
              break;
            }
            g = uni[a];
          }
        break;
      }
    if (!ans) cout << "No\n";
  }
  return 0;
}
