#include <bits/stdc++.h>
#pragma optimize(3)
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e5 + 5;
const double eps = 1e-8;
int n, m, T;
struct noob {
  int x, y;
  bool operator<(const noob a) const {
    return (x < a.x) || (x == a.x && y < a.y);
  }
};
int ans = 0, temp = 0;
bool pp = false;
bool f[N];
int a[N], s[3], u[N], p[N], l[N], M[N], tt[N], u1[N];
vector<int> G[N];
void dfs1(int x) {
  int r = 1;
  tt[1] = x;
  for (int I = 1; I <= r; I++) {
    int i = tt[I];
    for (int j : G[i]) {
      if (u[j]) continue;
      u[j] = i;
      tt[++r] = j;
      if (a[j] % 3 == 1) {
        temp = j;
        return;
      }
    }
  }
}
void dfs2(int x) {
  int r = 1;
  tt[1] = x;
  for (int I = 1; I <= r; I++) {
    int i = tt[I];
    for (int j : G[i]) {
      if (pp) return;
      if (j == u[i] || a[j] % 3 == 1) continue;
      if (u[j]) {
        temp = 2;
        int ss = j, st = i;
        for (int k = 1; k <= n; k++) f[k] = false;
        f[ss] = f[st] = true;
        while (ss != st) {
          ss = u[ss];
          if (ss != st)
            temp++, f[ss] = true;
          else
            break;
          st = u[st];
          if (ss != st)
            temp++, f[st] = true;
          else
            break;
        }
        if (temp >= n) {
          temp = n + 1;
          return;
        }
        pp = true;
        puts("Yes");
        printf("%d\n", n - temp);
        for (int k = 1; k <= n; k++)
          if (!f[k]) printf("%d ", k);
        puts("");
      }
      u[j] = i;
      tt[++r] = j;
    }
  }
}
void dfs3(int x) {
  int r = 1;
  tt[1] = x;
  for (int I = 1; I <= r; I++) {
    int i = tt[I];
    for (int j : G[i]) {
      if (pp) return;
      if (u1[j] == u1[i] || a[j] % 3 != 2 || f[j] || l[j]) continue;
      if (u[j]) {
        int ss = j, st = i;
        if (!f[ss]) temp++;
        if (!f[st]) temp++;
        f[ss] = f[st] = true;
        while (ss != st) {
          ss = u[ss];
          if (ss != st) {
            if (!f[ss]) temp++;
            f[ss] = true;
          } else
            break;
          st = u[st];
          if (ss != st) {
            if (!f[st]) temp++;
            f[st] = true;
          } else
            break;
        }
        return;
      }
      u[j] = i;
      u1[j] = (i == x) ? j : u1[i];
      tt[++r] = j;
    }
  }
}
void dfs32(int x, int y) {
  if (x == y) {
    for (int i : G[x])
      if (f[i]) dfs32(i, y);
    return;
  }
  l[x] = 1;
  if (f[x])
    for (int i : G[x]) {
      if (i == y) continue;
      if (l[i] == 0) dfs32(i, y);
    }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> T;
  while (T--) {
    pp = false;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) a[i] = 0, G[i].clear();
    for (int i = 0; i <= 2; i++) s[i] = 0;
    int x, y;
    for (int i = 1; i <= m; i++) {
      cin >> x >> y;
      a[x]++;
      a[y]++;
      G[x].push_back(y);
      G[y].push_back(x);
    }
    for (int i = 1; i <= n; i++) s[a[i] % 3]++;
    if (n >= 4 && s[0]) {
      int t;
      puts("Yes");
      for (int i = 1; i <= n; i++)
        if (a[i] % 3 == 0) t = i;
      printf("%d\n", n - 1);
      for (int i = 1; i <= n; i++)
        if (i != t) printf("%d ", i);
      puts("");
      continue;
    }
    if (n >= 4 && s[1] >= 2) {
      for (int i = 1; i <= n; i++)
        if (a[i] % 3 == 1) {
          temp = -1;
          for (int j = 1; j <= n; j++) u[j] = 0;
          u[i] = n + 1;
          dfs1(i);
          if (temp != -1) {
            int tp = 1;
            for (int i = 1; i <= n; i++) f[i] = 0;
            while (temp != i) {
              f[i] = 1;
              tp++;
              temp = u[temp];
            }
            f[i] = 1;
            if (tp < n) {
              pp = true;
              puts("Yes");
              printf("%d\n", n - tp);
              for (int i = 1; i <= n; i++)
                if (!f[i]) printf("%d ", i);
              puts("");
              break;
            } else {
              pp = true;
              puts("No");
              break;
            }
          } else {
            pp = true;
            puts("No");
            break;
          }
        }
      if (pp) continue;
    }
    if (n >= 4) {
      for (int j = 1; j <= n; j++) l[j] = u[j] = u1[j] = 0;
      for (int i = 1; i <= n; i++)
        if (a[i] % 3 == 2 && u[i] == 0 && !pp) {
          u[i] = n + 1;
          dfs2(i);
          if (pp) break;
          if (temp == n + 1) {
            {
              pp = true;
              puts("No");
              break;
            }
          }
        }
      if (pp) continue;
    }
    if (n >= 5 && s[1] == 1) {
      for (int i = 1; i <= n; i++)
        if (a[i] % 3 == 1) {
          for (int j = 1; j <= n; j++) l[j] = u[j] = 0;
          for (int k = 1; k <= n; k++) f[k] = false;
          f[i] = true;
          u[i] = u1[i] = n + 1;
          temp = 1;
          dfs3(i);
          dfs32(i, i);
          for (int j = 1; j <= n; j++) u[j] = 0;
          u[i] = n + 1;
          int temp2 = temp;
          dfs3(i);
          if (temp <= temp2 || temp2 == 1) {
            pp = true;
            puts("No");
            break;
          }
          if (temp < n) {
            puts("Yes");
            printf("%d\n", n - temp);
            for (int i = 1; i <= n; i++)
              if (!f[i]) printf("%d ", i);
            puts("");
            pp = true;
            break;
          } else {
            pp = true;
            puts("No");
            break;
          }
        }
      if (pp) continue;
    }
    puts("No");
  }
  return 0;
}
