#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;
int dfs(int cur, int prv, int h) {
  if (cur == h) return 0;
  if (vst[cur]) {
    ans.push_back(cur);
    return cur;
  }
  vst[cur] = true;
  for (int nxt : v[cur]) {
    if (nxt != prv) {
      int c = dfs(nxt, cur, h);
      if (c < 0) return -1;
      if (c == cur) return -1;
      if (c) {
        ans.push_back(cur);
        return c;
      }
    }
  }
  return 0;
}
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 fin() {
  for (int i = 1; i <= n; i++) {
    if (((int)((v[i]).size())) > 2) {
      ans.clear();
      dfs(i, 0, v[i][0]);
      for (int i = 1; i <= n; i++) vst[i] = false;
      for (int e : ans) vst[e] = true;
      print();
      return;
    }
  }
}
void proc() {
  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);
        for (int i = 1; i <= n; i++) vst[i] = false;
        while (!q.empty()) {
          int cur = q.front();
          q.pop();
          if (cur != i && ((int)((v[cur]).size())) % 3 == 1 &&
              dis[cur] < n - 1) {
            while (cur != i) vst[cur] = true, cur = prv[cur];
            vst[i] = true;
            print();
            return;
          }
          for (int nxt : v[cur])
            if (dis[nxt] == INF)
              dis[nxt] = dis[cur] + 1, prv[nxt] = cur, q.push(nxt);
        }
        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;
    ans.clear();
    for (int i = 1; i <= n; i++)
      if (!vst[i] && dfs(i, 0, idx)) {
        for (int i = 1; i <= n; i++) vst[i] = false;
        for (int e : ans) vst[e] = true;
        print();
        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;
  }
  for (int i = 1; i <= n; i++) vst[i] = false;
  fin();
}
int main(void) {
  int tc;
  scanf("%d", &tc);
  while (tc--) proc();
}
