#include <bits/stdc++.h>
using namespace std;
const int maxn = 500 * 1000 + 10;
int t, n, m, u, v, d[maxn], p[maxn], ted, tr, tb;
vector<int> ds, vd[3], vec[maxn];
bool mark[maxn], cf, park[maxn];
queue<int> q;
void bfs() {
  while (!cf && !q.empty()) {
    u = q.front();
    q.pop();
    for (auto w : vec[u]) {
      if (d[w] % 3 != 2) continue;
      if (!mark[w]) {
        mark[w] = 1;
        q.push(w);
        p[w] = u;
      } else if (w != p[u]) {
        cf = 1;
        v = w;
        while (v >= 0 && !park[v]) {
          park[v] = 1;
          ted++;
          v = p[v];
        }
        v = u;
        while (v >= 0 && !park[v]) {
          park[v] = 1;
          ted++;
          v = p[v];
        }
        break;
      }
    }
  }
}
void bfs2() {
  while (!cf && !q.empty()) {
    u = q.front();
    q.pop();
    for (auto w : vec[u]) {
      if (!mark[w]) {
        if (d[w] % 3 == 1) {
          cf = 1;
          v = w;
          while (v >= 0) {
            ted++;
            park[v] = 1;
            v = p[v];
          }
          break;
        }
        mark[w] = 1;
        p[w] = u;
        q.push(w);
      }
    }
  }
}
void dfs(int x) {
  if (tb == 2) return;
  mark[x] = 1;
  for (auto w : vec[x]) {
    if (tb == 2) break;
    if (!mark[w]) {
      if (x == vd[1][0]) tr++;
      p[w] = x;
      dfs(w);
    } else if (w == vd[1][0] && tb < tr && w != p[x]) {
      tb++;
      v = x;
      while (v != vd[1][0]) {
        park[v] = 1;
        ted++;
        v = p[v];
      }
      if (tb == 2) break;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  scanf("%d", &t);
  for (int z = 0; z < t; z++) {
    for (int i = 0; i < 3; i++) vd[i].clear();
    while (!q.empty()) q.pop();
    ted = tb = tr = 0;
    cf = 0;
    scanf("%d %d", &n, &m);
    for (int i = 0; i < n; i++) {
      vec[i].clear();
      d[i] = 0;
      mark[i] = park[i] = 0;
    }
    ds.clear();
    for (int i = 0; i < m; i++) {
      scanf("%d %d", &u, &v);
      u--;
      v--;
      d[u]++;
      d[v]++;
      vec[u].push_back(v);
      vec[v].push_back(u);
    }
    for (int i = 0; i < n; i++) {
      vd[d[i] % 3].push_back(i);
      ds.push_back(d[i]);
    }
    sort(ds.begin(), ds.end());
    if (m == n && ds[0] == 2 && ds.back() == 2) {
      printf("No\n");
      continue;
    }
    if (m == n - 1 && (((int)vd[1].size())) < 3) {
      printf("No\n");
      continue;
    }
    if (m == n + 1 && ds[0] == 2 && ds.back() == 4 &&
        ds[(((int)ds.size())) - 2] == 2) {
      printf("No\n");
      continue;
    }
    printf("Yes\n");
    if ((((int)vd[0].size())) > 0) {
      printf("%d\n", n - 1);
      for (int i = 0; i < n; i++) {
        if (i != vd[0][0]) printf("%d ", i + 1);
      }
      printf("\n");
      continue;
    }
    for (auto w : vd[2]) {
      if (!mark[w]) {
        p[w] = -1;
        q.push(w);
        mark[w] = 1;
        bfs();
        if (cf) {
          printf("%d\n", n - ted);
          for (int i = 0; i < n; i++) {
            if (!park[i]) printf("%d ", i + 1);
          }
          printf("\n");
          break;
        }
      }
    }
    if (cf) continue;
    for (int i = 0; i < n; i++) mark[i] = 0;
    for (auto w : vd[1]) {
      if (!mark[w]) {
        q.push(w);
        mark[w] = 1;
        p[w] = -1;
        bfs2();
        if (cf) {
          printf("%d\n", n - ted);
          for (int i = 0; i < n; i++) {
            if (!park[i]) printf("%d ", i + 1);
          }
          printf("\n");
          break;
        }
      }
    }
    if (cf) continue;
    for (int i = 0; i < n; i++) mark[i] = 0;
    park[vd[1][0]] = 1;
    ted = 1;
    dfs(vd[1][0]);
    printf("%d\n", n - ted);
    for (int i = 0; i < n; i++) {
      if (!park[i]) printf("%d ", i + 1);
    }
    printf("\n");
  }
  return 0;
}
