#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], ali[MAXN];
int uni[MAXN], uo[MAXN], cnt[MAXN];
int w[MAXN], dis[MAXN];
int dfs(int x, int p, int u) {
  chk[x] = ali[x] = true;
  uni[x] = u;
  for (auto a : ed[x])
    if (a != p && ali[a]) return a;
  for (auto a : ed[x])
    if (!chk[a] && ed[a].size() % 3 == 2) {
      int t = dfs(a, x, u);
      if (t) {
        if (t == -1) ali[x] = false;
        return t == x ? -1 : t;
      }
    }
  ali[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;
  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(ali + 1, 0, sizeof(bool) * N);
    for (int i = 1; i <= N; i++)
      if (!chk[i] && ed[i].size() % 3 == 2 && dfs(i, 0, i)) {
        for (int j = 1; j <= N; j++) chk[j] = ali[j];
        print();
        ans = true;
        break;
      }
    if (ans) continue;
    for (int i = 1; i <= N; i++)
      if (ed[i].size() % 3 == 1) {
        for (auto a : ed[i])
          if (ed[a].size() % 3 == 1) {
            memset(chk + 1, 0, sizeof(bool) * N);
            chk[i] = chk[a] = true;
            print();
            ans = true;
            break;
          }
        if (ans) 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) {
            int g = uni[a];
            if (uo[g] == i) continue;
            if (uo[g]) {
              memset(chk + 1, 0, sizeof(bool) * N);
              bfs(uo[g], g);
              int mn = 0;
              for (auto b : ed[i])
                if (w[b] && (!mn || dis[b] < dis[mn])) mn = b;
              path(mn);
              chk[i] = true;
              print();
              ans = true;
              break;
            }
            cnt[i]++;
            uo[g] = 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] && (!mn || dis[b] < dis[mn])) mn = b;
            path(mn);
            if (g) {
              chk[i] = true;
              print();
              ans = true;
              break;
            }
            g = uni[a];
          }
        if (ans) break;
      }
    if (!ans) cout << "No\n";
  }
  return 0;
}
