#include <bits/stdc++.h>
using namespace std;
constexpr int kN = int(5E5 + 10);
vector<int> graph[kN], ans;
bool went[kN], in[kN];
int cnt, d[kN], lst[kN], dis[kN];
void output(int n) {
  if (ans.empty() || int(ans.size()) == n)
    printf("No\n");
  else {
    printf("Yes\n%d\n", int(ans.size()));
    for (int i = 1; i < int(ans.size()); i++) printf("%d ", ans[i]);
    printf("%d\n", ans[0]);
  }
  return;
}
void dfs2(int pos) {
  went[pos] = true;
  in[pos] = true;
  for (int i : graph[pos])
    if (!went[i] && d[i] == 2) dfs2(i);
  return;
}
void solve(bool debug) {
  queue<int> q;
  int n, m, nxt;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) graph[i].clear();
  for (int i = 1, l, r; i <= m; i++) {
    scanf("%d%d", &l, &r);
    graph[l].push_back(r);
    graph[r].push_back(l);
  }
  ans.clear();
  for (int i = 1; i <= n; i++) d[i] = int(graph[i].size()) % 3;
  for (int i = 1; i <= n; i++)
    if (d[i] == 0) {
      for (int j = 1; j <= n; j++)
        if (i != j) ans.push_back(j);
      if (debug) printf("zero\n");
      output(n);
      return;
    }
  for (int i = 1; i <= n; i++) went[i] = false;
  for (int i = 1; i <= n; i++) in[i] = false;
  cnt = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && !went[i]) {
      q.push(i);
      dis[i] = 0;
      went[i] = true;
      while (!q.empty()) {
        nxt = q.front();
        q.pop();
        for (int j : graph[nxt])
          if (went[j] && lst[nxt] != j) {
            while (j != nxt) {
              if (dis[j] > dis[nxt]) {
                in[j] = true;
                j = lst[j];
              } else {
                in[nxt] = true;
                nxt = lst[nxt];
              }
            }
            in[nxt] = true;
            for (int k = 1; k <= n; k++)
              if (!in[k]) ans.push_back(k);
            output(n);
            return;
          }
        for (int j : graph[nxt])
          if (!went[j] && d[j] == 2) {
            went[j] = true;
            lst[j] = nxt;
            dis[j] = dis[nxt] + 1;
            q.push(j);
          }
      }
    }
  for (int i = 1; i <= n; i++) went[i] = false;
  for (int i = 1; i <= n; i++) in[i] = false;
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) {
      q.push(i);
      went[i] = true;
      while (!q.empty()) {
        nxt = q.front();
        q.pop();
        if (nxt != i && d[nxt] == 1) {
          if (debug) printf("path\n");
          while (nxt != i) {
            in[nxt] = true;
            nxt = lst[nxt];
          }
          in[i] = true;
          for (int j = 1; j <= n; j++)
            if (!in[j]) ans.push_back(j);
          output(n);
          return;
        }
        for (int j : graph[nxt])
          if (!went[j]) {
            went[j] = true;
            lst[j] = nxt;
            q.push(j);
          }
      }
    }
  for (int i = 1; i <= n; i++) went[i] = false;
  for (int i = 1; i <= n; i++) in[i] = false;
  cnt = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && int(graph[i].size()) >= 5) {
      went[i] = true;
      for (int j : graph[i])
        if (d[j] == 2) {
          dfs2(j);
          cnt++;
          if (cnt == 3) break;
        }
      if (cnt == 3) {
        for (int j = 1; j <= n; j++)
          if (in[j]) ans.push_back(j);
        output(n);
        return;
      }
    }
  for (int i = 1; i <= n; i++) went[i] = false;
  for (int i = 1; i <= n; i++) in[i] = false;
  cnt = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] == 2 && !in[i]) {
      dfs2(i);
      cnt++;
      if (cnt == 3) {
        for (int j = 1; j <= n; j++)
          if (in[j]) ans.push_back(j);
        output(n);
        return;
      }
    }
  output(n);
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) solve(false);
}
