#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3c3c3c3c;
const long long LINF = 1ll * INF * INF * 2;
const int N = 1000001;
int n, m, x, y;
vector<int> v[N];
queue<int> q;
int dis[N];
int prv[N];
bool vst[N];
int idx;
vector<int> ans;
pair<int, int> Z = {0, 0};
pair<int, int> dfs(int cur, int prv, int h) {
  if (cur == h) return Z;
  if (vst[cur]) return {cur, prv};
  vst[cur] = true;
  for (int nxt : v[cur]) {
    if (nxt == prv) continue;
    pair<int, int> temp = dfs(nxt, cur, h);
    if (temp != Z) return temp;
  }
  return Z;
}
void print();
bool findCycle(int h) {
  for (int i = 1; i <= n; i++) vst[i] = false;
  for (int i = 1; i <= n; i++) {
    if (vst[i]) continue;
    pair<int, int> c = dfs(i, 0, h);
    if (c != Z) {
      int s = c.first, e = c.second;
      for (int j = 1; j <= n; j++) dis[j] = INF;
      dis[s] = 0;
      q.push(s);
      while (!q.empty()) {
        int cur = q.front();
        q.pop();
        for (int nxt : v[cur]) {
          if (cur == s && nxt == e) continue;
          if (cur == h) continue;
          if (dis[nxt] == INF)
            dis[nxt] = dis[cur] + 1, prv[nxt] = cur, q.push(nxt);
        }
      }
      for (int j = 1; j <= n; j++) vst[j] = false;
      for (int j = e; j != s; j = prv[j]) vst[j] = true;
      vst[s] = true;
      print();
      return true;
    }
  }
  return false;
}
void print() {
  printf("Yes\n");
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!vst[i]) cnt++;
  printf("%d\n", cnt);
  for (int i = 1; i <= n; i++)
    if (!vst[i]) printf("%d ", i);
  printf("\n");
}
void mark(int cur) {
  if (vst[cur]) return;
  vst[cur] = true;
  for (int nxt : v[cur]) mark(nxt);
}
void unmark(int cur, int x, int y) {
  if (cur == x || cur == y) return;
  if (!vst[cur]) return;
  vst[cur] = false;
  for (int nxt : v[cur]) unmark(nxt, x, y);
}
void proc(int tc) {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) v[i].clear();
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  if (n == 1) {
    printf("No\n");
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (((int)((v[i]).size())) % 3 == 0) {
      for (int i = 1; i <= n; i++) vst[i] = false;
      vst[i] = true;
      print();
      return;
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (((int)((v[i]).size())) % 3 == 1) cnt++;
  if (cnt > 1) {
    for (int i = 1; i <= n; i++) {
      if (((int)((v[i]).size())) % 3 == 1) {
        for (int i = 1; i <= n; i++) dis[i] = INF;
        dis[i] = 0;
        q.push(i);
        while (!q.empty()) {
          int cur = q.front();
          q.pop();
          for (int nxt : v[cur])
            if (dis[nxt] == INF)
              dis[nxt] = dis[cur] + 1, prv[nxt] = cur, q.push(nxt);
        }
        int tt = INF;
        for (int j = 1; j <= n; j++) {
          if (i != j && ((int)((v[j]).size())) % 3 == 1) tt = min(tt, dis[j]);
        }
        if (tt == n - 1) {
          printf("No\n");
          return;
        }
        for (int j = 1; j <= n; j++) {
          if (i != j && ((int)((v[j]).size())) % 3 == 1 && dis[j] == tt) {
            for (int i = 1; i <= n; i++) vst[i] = false;
            for (int c = j; c != i; c = prv[c]) {
              vst[c] = true;
            }
            vst[i] = true;
            print();
            return;
          }
        }
        printf("No\n");
        return;
      }
    }
  }
  if (cnt == 1) {
    for (int i = 1; i <= n; i++)
      if (((int)((v[i]).size())) % 3 == 1) {
        idx = i;
        break;
      }
    for (int i = 1; i <= n; i++) vst[i] = false;
    if (findCycle(idx)) return;
    for (int i = 1; i <= n; i++) {
      if (i == idx) continue;
      if (((int)((v[i]).size())) > 3) {
        for (int i = 1; i <= n; i++) vst[i] = true;
        int c = 0;
        for (int j = 0; c < 3; j++) {
          if (v[i][j] == idx) continue;
          unmark(v[i][j], i, idx);
          c++;
        }
        print();
        return;
      }
    }
    if (((int)((v[idx]).size())) == 4) {
      printf("No\n");
      return;
    }
    int t = 0;
    vst[idx] = true;
    for (int i = 1; i <= n; i++) vst[i] = false;
    vst[idx] = true;
    for (int i = 0; t < 2; i++) {
      if (vst[v[idx][i]]) continue;
      mark(v[idx][i]);
      t++;
    }
    print();
    return;
  }
  bool flag = true;
  for (int i = 1; i <= n; i++)
    if (((int)((v[i]).size())) != 2) {
      flag = false;
      break;
    }
  if (flag) {
    printf("No\n");
    return;
  }
  findCycle(0);
}
void findTC(int num, int x) {
  for (int tc = 1; tc <= num; tc++) {
    scanf("%d%d", &n, &m);
    if (tc == x) printf("%d %d\n", n, m);
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &x, &y);
      if (tc == x) printf("%d %d\n", x, y);
    }
  }
}
int main(void) {
  int tc;
  scanf("%d", &tc);
  for (int i = 1; i <= tc; i++) proc(i);
}
