#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];
void output(int n) {
  if (ans.empty() || int(ans.size()) == n)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 1; i < int(ans.size()); i++) printf("%d ", ans[i]);
    printf("%d\n", ans[0]);
  }
  return;
}
bool dfs(int pos, int from) {
  in[pos] = true;
  if (pos != from && d[pos] == 1) return true;
  went[pos] = true;
  for (int i : graph[pos])
    if (!went[i]) {
      if (dfs(i, from)) return true;
    }
  in[pos] = false;
  return false;
}
bool dfs1(int pos, int from) {
  went[pos] = true;
  in[pos] = true;
  cnt++;
  for (int i : graph[pos])
    if (i == from && cnt > 2) return true;
  for (int i : graph[pos])
    if (!went[i] && d[i] == 2 && dfs1(i, from)) return true;
  in[pos] = false;
  cnt--;
  return false;
}
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() {
  int n, m;
  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) {
      ans.push_back(i);
      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) {
      if (dfs1(i, i)) {
        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;
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) {
      if (dfs(i, i)) {
        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 && 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;
      }
    }
  output(n);
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
