#include <bits/stdc++.h>
using namespace std;
int n, m;
struct Edge {
  int to, next;
} bus[2020202];
int st[1010101], z, fa[1010101], ret, dep[1010101], pr[1010101], s[1010101],
    deg[1010101], LR[1010101];
int root = 0, tail, vis[1010101];
int T;
inline void AddE(int from, int to) {
  bus[++z].to = to;
  bus[z].next = st[from];
  st[from] = z;
}
inline int Check(int now) {
  vis[now] = 1;
  int yeye = 0;
  for (int i = st[now]; i; i = bus[i].next) {
    if (bus[i].to == fa[now]) continue;
    if (vis[bus[i].to] && dep[bus[i].to] > dep[yeye]) yeye = bus[i].to;
  }
  if (yeye && dep[yeye] + n - 1 != dep[now]) {
    tail = 0;
    while (now != yeye) {
      s[++tail] = now;
      now = fa[now];
    }
    s[++tail] = now;
    return 1;
  }
  for (int i = st[now]; i; i = bus[i].next) {
    if (vis[bus[i].to]) continue;
    if (deg[bus[i].to] % 3 != 2) continue;
    dep[bus[i].to] = dep[now] + 1;
    fa[bus[i].to] = now;
    if (Check(bus[i].to)) return 1;
  }
  return 0;
}
inline void paint(int now) {
  vis[now] = 1;
  if (!ret && LR[now]) {
    int tmp = now;
    while (tmp != root) {
      s[++tail] = tmp;
      tmp = fa[tmp];
    }
    ret = 1;
  }
  for (int i = st[now]; i; i = bus[i].next) {
    if (deg[bus[i].to] % 3 == 1) continue;
    if (vis[bus[i].to]) continue;
    fa[bus[i].to] = now;
    paint(bus[i].to);
  }
}
inline void print() {
  for (int i = 1; i <= tail; i++) pr[s[i]] = 1;
  printf("Yes\n%d\n", n - tail);
  for (int i = 1; i <= n; i++)
    if (!pr[i]) printf("%d ", i);
  printf("\n");
}
inline void work() {
  int aa, bb;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++)
    LR[i] = deg[i] = pr[i] = vis[i] = fa[i] = st[i] = 0;
  root = z = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &aa, &bb);
    AddE(aa, bb), AddE(bb, aa), deg[aa]++, deg[bb]++;
  }
  if (n == 1 || n == 2) {
    printf("No\n");
    return;
  }
  for (int i = 1; i <= n; i++)
    if (deg[i] % 3 == 0) {
      s[(tail = 1)] = i;
      print();
      return;
    }
  for (int i = 1; i <= n; i++)
    if (!vis[i] && deg[i] % 3 == 2) {
      dep[i] = 1;
      tail = 0;
      if (Check(i)) {
        print();
        return;
      }
    }
  for (int i = 1; i <= n; i++) fa[i] = vis[i] = 0;
  for (int i = 1; i <= n; i++)
    if (deg[i] % 3 == 1) {
      tail = 0;
      if (!root)
        root = i;
      else {
        queue<int> q;
        q.push(root);
        vis[root] = 1;
        int x;
        while (!q.empty()) {
          x = q.front();
          q.pop();
          for (int j = st[x]; j; j = bus[j].next) {
            if (vis[bus[j].to]) continue;
            if (deg[bus[j].to] % 3 == 1) {
              tail = 0;
              int now = x;
              s[++tail] = bus[j].to;
              while (now != root) {
                s[++tail] = now;
                now = fa[now];
              }
              s[++tail] = root;
              if (tail == n) {
                printf("No\n");
                return;
              }
              print();
              return;
            }
            fa[bus[j].to] = x;
            vis[bus[j].to] = 1;
            q.push(bus[j].to);
          }
        }
      }
    }
  if (root) {
    s[(tail = 1)] = root;
    int cnt = 0;
    for (int i = st[root]; i; i = bus[i].next) {
      LR[bus[i].to] = 1;
    }
    for (int i = st[root]; i; i = bus[i].next) {
      if (vis[bus[i].to]) continue;
      fa[bus[i].to] = root;
      LR[bus[i].to] = 0;
      cnt++;
      ret = 0;
      paint(bus[i].to);
      if (cnt == 2) break;
    }
    if (tail < n) {
      print();
      return;
    }
  }
  printf("No\n");
}
int main() {
  scanf("%d", &T);
  while (T--) {
    work();
  }
  return 0;
}
