#include <bits/stdc++.h>
using namespace std;
int n, m, u[500005], v[500005], deg[500005];
int st[500005], N, inq[500005], vis[500005], cnt;
vector<int> ans, edge[500005];
void out() {
  if (ans.size() == n) {
    puts("No");
    return;
  }
  assert(ans.size());
  puts("Yes");
  printf("%d\n", n - (int)ans.size());
  for (int i = 1; i <= n; ++i) vis[i] = 0;
  for (int i = 0; i < ans.size(); ++i) vis[ans[i]] = 1;
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) printf("%d ", i);
  for (int i = 1; i <= n; ++i) vis[i] = 0;
  puts("");
}
bool search(int x, int lst = 0) {
  assert(deg[x] == 2);
  vis[x] = 1;
  inq[x] = 1;
  st[++N] = x;
  for (int i = 0; i < edge[x].size(); ++i) {
    int v = edge[x][i];
    if (lst == v || deg[v] == 1) continue;
    if (inq[v]) {
      while (st[N] != v) {
        ans.push_back(st[N--]);
      }
      ans.push_back(st[N]);
      return 1;
    }
    if (search(v, x)) return 1;
  }
  N--;
  inq[x] = 0;
  return 0;
}
int rt, flag;
bool _search(int x, int lst = 0) {
  vis[x] = 1;
  inq[x] = 1;
  st[++N] = x;
  for (int i = 0; i < edge[x].size(); ++i) {
    int v = edge[x][i];
    if (v == lst || vis[v]) continue;
    if (deg[v] == 1 && v != rt) {
      ans.push_back(v);
      for (int i = 1; i <= N; ++i) ans.push_back(st[i]);
      return 1;
    }
    if (_search(v, x)) return 1;
  }
  N--;
  inq[x] = 0;
  return 0;
}
void SEARCH(int x, int lst = 0) {
  inq[x] = 1;
  st[++N] = x;
  for (int i = 0; i < edge[x].size(); ++i) {
    int v = edge[x][i];
    if (v == lst || vis[v]) continue;
    if (v != rt) vis[v] = vis[x];
    if (v == rt) {
      if (flag) continue;
      for (int i = 1; i <= N; ++i) {
        ans.push_back(st[i]);
      }
      flag = 1;
    } else
      SEARCH(v, x);
  }
  inq[x] = 0;
  N--;
}
void solve() {
  scanf("%d%d", &n, &m);
  N = 0;
  ans.clear();
  for (int i = 1; i <= n; ++i) {
    edge[i].clear();
    vis[i] = inq[i] = deg[i] = 0;
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &u[i], &v[i]);
    edge[u[i]].push_back(v[i]);
    edge[v[i]].push_back(u[i]);
    deg[u[i]]++;
    deg[v[i]]++;
  }
  for (int i = 1; i <= n; ++i) deg[i] %= 3;
  for (int i = 1; i <= n; ++i)
    if (deg[i] == 0) {
      ans.push_back(i);
      out();
      return;
    }
  bool ok = 0;
  for (int i = 1; i <= m; ++i) {
    if (deg[u[i]] == 1 && deg[v[i]] == 1) {
      ans.push_back(u[i]);
      ans.push_back(v[i]);
      out();
      return;
    }
  }
  for (int i = 1; i <= n; ++i)
    if (!vis[i] && deg[i] == 2) {
      if (search(i)) {
        out();
        return;
      }
    }
  for (int i = 1; i <= n; ++i) vis[i] = inq[i] = 0;
  N = 0;
  int tot = 0;
  rt = 0;
  for (int i = 1; i <= n; ++i) {
    if (deg[i] == 1) tot++, rt = i;
  }
  assert(tot);
  if (tot > 1) {
    _search(rt);
    out();
    return;
  } else {
    ans.push_back(rt);
    cnt = 0;
    for (int i = 1; i <= n; ++i) vis[i] = inq[i] = 0;
    N = 0;
    for (int i = 0; i < edge[rt].size(); ++i) {
      int v = edge[rt][i];
      if (!vis[v] && deg[v] == 2) {
        for (int i = 1; i <= n; ++i) inq[i] = 0;
        N = 0;
        flag = 0;
        vis[v] = ++cnt;
        SEARCH(v, rt);
        for (int i = 1; i <= n; ++i) inq[i] = 0;
        N = 0;
      }
      if (cnt == 2) break;
    }
    assert(cnt == 2);
    out();
  }
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    solve();
  }
  return 0;
}
