#include <bits/stdc++.h>
using namespace std;
int n, m, scc, rd[1000007];
int bel[1000007];
int dep[1000007], fa[1000007];
bool vis[1000007];
vector<int> p[500007];
vector<int> ans;
void output() {
  if (ans.size() == n) {
    puts("No");
    ans.clear();
  } else {
    printf("Yes\n%d\n", n - ans.size());
    for (int i = 1; i <= n; i++) vis[i] = 0;
    for (auto y : ans) {
      vis[y] = 1;
    }
    for (int i = 1; i <= n; i++) {
      if (vis[i] == 0) printf("%d ", i);
    }
    puts("");
  }
  ans.clear();
  return;
}
bool check0() {
  for (int i = 1; i <= n; i++) {
    if (rd[i] % 3 == 0) {
      printf("Yes\n%d\n", n - 1);
      for (int j = 1; j <= n; j++) {
        if (j != i) printf("%d ", j);
      }
      puts("");
      return true;
    }
  }
  return false;
}
queue<int> q;
int fr[1000007];
bool check1to1() {
  int st = 0, ed = 0;
  for (int i = 1; i <= n; i++) {
    if (rd[i] % 3 == 1) {
      st = i;
      break;
    }
  }
  if (st == 0) return false;
  for (int i = 1; i <= n; i++) {
    fr[i] = 0;
  }
  while (!q.empty()) {
    q.pop();
  }
  q.push(st);
  fr[st] = -1;
  while (!q.empty()) {
    int tp = q.front();
    q.pop();
    if (tp != st && rd[tp] % 3 == 1) {
      ed = tp;
      break;
    }
    for (auto y : p[tp]) {
      if (fr[y]) continue;
      fr[y] = tp;
      q.push(y);
    }
  }
  if (ed == 0) return false;
  ans.clear();
  int pos = ed;
  while ((~pos) && ans.size() < n) {
    ans.push_back(pos);
    pos = fr[pos];
  }
  output();
  return true;
}
void dfs(int v, int fr) {
  bel[v] = bel[fr];
  dep[v] = dep[fr] + 1;
  fa[v] = fr;
  vis[v] = 1;
  int back = 0;
  for (auto y : p[v]) {
    if (y == fr || rd[y] % 3 == 1) continue;
    if (vis[y] && dep[y] < dep[v] && ans.empty()) {
      if (dep[y] > dep[back]) back = y;
    }
  }
  if (back) {
    int tp = v;
    ans.push_back(tp);
    while (tp != back && ans.size() < n) {
      tp = fa[tp];
      ans.push_back(tp);
    }
  }
  for (auto y : p[v]) {
    if (!vis[y] && rd[y] % 3 == 2) {
      dfs(y, v);
    }
  }
  return;
}
bool checkcircle() {
  scc = 0;
  bel[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (rd[i] % 3 == 2 && !vis[i]) {
      bel[0] = i;
      dfs(i, 0);
    }
    if (ans.size()) {
      output();
      return true;
    }
  }
  bel[0] = 0;
  return false;
}
bool vst[1000007];
void deal(int pos, int id) {
  while (!q.empty()) q.pop();
  int st;
  for (int i = 1; i <= n; i++) {
    if (bel[i] == id) {
      for (auto y : p[i]) {
        if (y == pos) {
          q.push(i);
          st = i;
          break;
        }
      }
      if (q.size()) break;
    }
  }
  for (int i = 1; i <= n; i++) {
    fr[i] = 0;
  }
  fr[q.front()] = -1;
  while (!q.empty()) {
    int tp = q.front();
    q.pop();
    if (tp == pos) break;
    for (auto y : p[tp]) {
      if (y == pos && tp != st || rd[y] % 3 == 2) {
        if (fr[y] == 0) {
          fr[y] = tp;
          q.push(y);
        }
      }
    }
  }
  int top = pos;
  while (~fr[top] && ans.size() < n) {
    top = fr[top];
    ans.push_back(top);
  }
  return;
}
bool checkfinal() {
  int pos;
  for (int i = 1; i <= n; i++) {
    if (rd[i] % 3 == 1) {
      pos = i;
    }
    vst[i] = 0;
  }
  if (rd[pos] < 4) {
    puts("No");
    return true;
  }
  ans.clear();
  int res = 2;
  for (int i = 1; i <= n && res; i++) {
    if (rd[i] % 3 == 2) {
      if (!vst[bel[i]]) {
        deal(pos, bel[i]);
        vst[bel[i]] = 1;
        res--;
      }
    }
  }
  ans.push_back(pos);
  output();
  return true;
}
void work() {
  scanf("%d%d", &n, &m);
  if (n == 1) {
    puts("No");
    return;
  }
  scc = 0;
  ans.clear();
  for (int i = 1; i <= n; i++) {
    rd[i] = 0;
    p[i].clear();
    vis[i] = 0;
  }
  for (int i = 1, x, y; i <= m; i++) {
    scanf("%d%d", &x, &y);
    p[x].push_back(y);
    p[y].push_back(x);
    rd[x]++;
    rd[y]++;
  }
  if (check0()) {
    return;
  }
  if (check1to1()) {
    return;
  }
  if (checkcircle()) {
    return;
  }
  if (checkfinal()) {
    return;
  }
  puts("No");
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    work();
  }
  return 0;
}
