#include <bits/stdc++.h>
const int MAX_N = 5e5 + 5;
int t, n, m, deg[MAX_N], pre[MAX_N];
bool chk[MAX_N], con[MAX_N], skip;
std::vector<int> adj[MAX_N];
bool print_ans() {
  skip = true;
  int cnt = 0;
  for (int i = 1; i <= n; ++i) cnt += chk[i];
  if (cnt == 0) return false;
  std::cout << "Yes\n" << cnt << '\n';
  for (int i = 1; i <= n; ++i)
    if (chk[i]) std::cout << i << ' ';
  std::cout << '\n';
  return true;
}
bool case_1() {
  for (int i = 1; i <= n; ++i)
    if (deg[i] == 0) {
      chk[i] = false;
      return print_ans();
    }
  return false;
}
bool case_2() {
  if (skip) return false;
  std::fill(pre + 1, pre + n + 1, 0);
  for (int s = 1; s <= n; ++s)
    if (deg[s] == 1) {
      pre[s] = -1;
      std::queue<int> que;
      for (que.push(s); !que.empty(); que.pop())
        for (int i : adj[que.front()])
          if (pre[i] == 0) {
            pre[i] = que.front();
            que.push(i);
            if (deg[i] == 1) {
              for (; i != -1; i = pre[i]) chk[i] = false;
              return print_ans();
            }
          }
      return false;
    }
  return false;
}
bool case_3() {
  if (skip) return false;
  std::fill(pre + 1, pre + n + 1, 0);
  for (int i = 1; i <= n; ++i)
    if (deg[i] == 2 && pre[i] == 0) {
      pre[i] = -1;
      std::queue<int> que;
      for (que.push(i); !que.empty(); que.pop())
        for (int j : adj[que.front()])
          if (deg[j] == 2)
            if (pre[j] == 0) {
              pre[j] = que.front();
              que.push(j);
            } else if (j != pre[que.front()]) {
              for (int k = j; k != -1; k = pre[k]) chk[k] = false;
              for (int k = que.front(), f = 0; k != -1; k = pre[k])
                if (chk[k])
                  chk[k] = false;
                else if (f)
                  chk[k] = true;
                else
                  f = 1;
              return print_ans();
            }
    }
  return false;
}
bool case_4() {
  if (skip) return false;
  std::fill(pre + 1, pre + n + 1, 0);
  std::fill(con + 1, con + n + 1, false);
  for (int i = 1; i <= n; ++i)
    if (deg[i] == 1) {
      for (int j : adj[i]) con[j] = true;
      chk[i] = false;
      int tmp = 0;
      for (int j = 1; j <= n; ++j)
        if (j != i && pre[j] == 0 && con[j]) {
          pre[j] = -1;
          std::queue<int> que;
          int t = 0;
          for (que.push(j); !que.empty(); que.pop())
            for (int k : adj[que.front()])
              if (k != i && pre[k] == 0) {
                pre[k] = que.front();
                que.push(k);
                if (t == 0 && con[k]) t = k;
              }
          assert(t != 0);
          for (; t != -1; t = pre[t]) chk[t] = false;
          if (++tmp == 2) return print_ans();
        }
    }
  return false;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  std::cin >> t;
  while (t--) {
    skip = false;
    std::cin >> n >> m;
    while (m--) {
      int u, v;
      std::cin >> u >> v;
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    for (int i = 1; i <= n; ++i) deg[i] = adj[i].size() % 3;
    std::fill(chk + 1, chk + n + 1, true);
    if (!case_1() && !case_2() && !case_3() && !case_4()) std::cout << "No\n";
    for (int i = 1; i <= n; ++i) adj[i].clear();
  }
  return 0;
}
