#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = false;
  while (!isdigit(c)) {
    if (c == '-') flag = true;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  if (flag) x = -x;
}
int T, n, m, rt, mn, px, py;
int d[1000010], pre[1000010], dep[1000010], fa[1000010], f[1000010];
bool tag[1000010], vis[1000010];
struct edge {
  int to, nxt;
} e[1000010];
int head[1000010], edge_cnt;
void add(int from, int to) {
  e[++edge_cnt] = {to, head[from]}, head[from] = edge_cnt;
}
struct node {
  int x, y;
} t[1000010];
int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); }
bool check1() {
  if (n == 1) return false;
  for (int i = 1; i <= n; ++i)
    if (!d[i]) return tag[i] = true;
  return false;
}
bool check2() {
  if (!rt || n == 2) return false;
  queue<int> q;
  q.push(rt);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = head[x]; i; i = e[i].nxt) {
      int y = e[i].to;
      if (pre[y] || !d[y] || y == rt) continue;
      if (d[y] == 1) {
        while (pre[x]) tag[x] = true, x = pre[x];
        return tag[rt] = tag[y] = true;
      }
      pre[y] = x, q.push(y);
    }
  }
  return false;
}
void dfs(int x) {
  for (int i = head[x]; i; i = e[i].nxt) {
    int y = e[i].to;
    if (!dep[y])
      fa[y] = x, dep[y] = dep[x] + 1, dfs(y);
    else if (x != rt && y != rt && y != fa[x] && dep[x] > dep[y] &&
             dep[x] - dep[y] < mn)
      px = x, py = y, mn = dep[x] - dep[y];
  }
}
bool check3() {
  mn = 1000000000, dfs(rt);
  if (mn != 1000000000) {
    while (px != py) tag[px] = true, px = fa[px];
    return tag[py] = true;
  }
  return false;
}
bool check4() {
  if (!rt || d[rt] <= 4) return false;
  for (int i = 1; i <= n; ++i) f[i] = i;
  for (int i = 1; i <= n; ++i)
    if (pre[i] != rt && i != rt) f[find(i)] = find(pre[i]);
  vis[rt] = true;
  for (int i = 1; i <= m; ++i) {
    int x = t[i].x, y = t[i].y;
    if (pre[x] == y || pre[y] == x || vis[find(x)] || vis[find(y)]) continue;
    vis[find(x)] = vis[find(y)] = true;
    if (!px)
      px = x, py = y;
    else {
      while (pre[x]) tag[x] = true, x = pre[x];
      while (pre[y]) tag[y] = true, y = pre[y];
      while (pre[px]) tag[px] = true, px = pre[px];
      while (pre[py]) tag[py] = true, py = pre[py];
      return tag[rt] = true;
    }
  }
  return false;
}
void print() {
  int cnt = 0;
  for (int i = 1; i <= n; ++i) cnt += tag[i];
  if (cnt == n || !cnt) {
    puts("No");
    return;
  }
  printf("Yes\n%d\n", cnt);
  for (int i = 1; i <= n; ++i)
    if (tag[i]) printf("%d ", i);
  putchar('\n');
}
void clear() {
  edge_cnt = px = py = 0;
  for (int i = 1; i <= n; ++i)
    head[i] = d[i] = tag[i] = pre[i] = dep[i] = fa[i] = vis[i] = 0;
}
int main() {
  read(T);
  while (T--) {
    read(n), read(m);
    for (int i = 1; i <= m; ++i) {
      int x, y;
      read(x), read(y), d[x]++, d[y]++;
      add(x, y), add(y, x), t[i] = {x, y};
    }
    for (int i = 1; i <= n; ++i) {
      d[i] %= 3;
      if (d[i] == 1) rt = i;
    }
    if (check1() || check2() || check3() || check4())
      print();
    else
      puts("No");
    clear();
  }
  return 0;
}
