#include <bits/stdc++.h>
using namespace std;
mt19937 mrand(random_device{}());
const long long mod = 1000000007;
int rnd(int x) { return mrand() % x; }
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 501000;
int pt[N], vis[N], par[N], dep[N], mark[N], n, m, suc, _, q[N];
vector<int> ps, e[N];
int sz[N], isr[N], l[N], r[N], totd, rt;
vector<int> lef, vec;
pair<int, int> pz[N];
void output(vector<int> x) {
  puts("Yes");
  for (int i = 1; i < n + 1; i++) mark[i] = 0;
  for (auto u : x) mark[u] = 1;
  printf("%d\n", n - ((int)(x).size()));
  for (int i = 1; i < n + 1; i++)
    if (!mark[i]) printf("%d ", i);
  puts("");
  suc = 1;
}
bool findp(int u, int d, int ww) {
  pt[d] = u;
  vis[u] = 1;
  if (u == ww) {
    ps = vector<int>(pt, pt + d + 1);
    return 1;
  }
  for (auto v : e[u]) {
    if (!vis[v]) {
      if (findp(v, d + 1, ww)) return 1;
    }
  }
  return 0;
}
bool dfs2(int u, int p, int d) {
  vis[u] = 1;
  dep[u] = d;
  par[u] = p;
  for (auto v : e[u]) {
    if (v == p) continue;
    if (((int)(e[v]).size()) % 3 == 1) continue;
    if (!vis[v]) {
      if (dfs2(v, u, d + 1)) {
        return 1;
      }
    } else if (dep[u] > dep[v]) {
      int w = dep[u] - dep[v] + 1;
      if (w != m) {
        ps.clear();
        int x = u;
        while (1) {
          ps.push_back(x);
          if (x == v) break;
          x = par[x];
        }
        return 1;
      }
    }
  }
  return 0;
}
void dfs(int u, int f) {
  vis[u] = 1;
  sz[u] = isr[u];
  l[u] = ++totd;
  if (isr[u]) lef.push_back(u);
  vec.push_back(u);
  for (auto v : e[u])
    if (v != f) {
      dfs(v, u);
      sz[u] += sz[v];
    }
  r[u] = totd;
}
void solve() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n + 1; i++) e[i].clear(), vis[i] = 0;
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  if (m == 0) return;
  for (int i = 1; i < n + 1; i++)
    if (((int)(e[i]).size()) % 3 == 0) {
      output(vector<int>{i});
      return;
    }
  vector<int> pc1;
  for (int v = 1; v < n + 1; v++)
    if (((int)(e[v]).size()) % 3 == 1) pc1.push_back(v);
  for (int i = 1; i < n + 1; i++) dep[i] = n + 1;
  auto gao = [&](int u) {
    int t = 0;
    q[t++] = u;
    dep[u] = 0;
    vector<int> x, y;
    for (int i = 0; i < t; i++) {
      int u = q[i];
      for (auto v : e[u]) {
        if (dep[v] == n + 1) {
          dep[v] = dep[u] + 1;
          par[v] = u;
          q[t++] = v;
        } else if (v != par[u]) {
          while (u != v) {
            if (dep[u] > dep[v]) {
              x.push_back(u);
              u = par[u];
            } else {
              y.push_back(v);
              v = par[v];
            }
          }
          x.push_back(u);
          reverse((y).begin(), (y).end());
          for (auto w : y) x.push_back(w);
          if (((int)(x).size()) == n) return 0;
          return 1;
        }
      }
    }
    return 0;
  };
  if (((int)(pc1).size()) >= 2) {
    int t = 0;
    q[t++] = pc1[0];
    dep[pc1[0]] = 0;
    for (int i = 0; i < t; i++) {
      int u = q[i];
      if (i != 0 && ((int)(e[u]).size()) % 3 == 1) {
        ps.clear();
        while (1) {
          ps.push_back(u);
          if (u == pc1[0]) break;
          u = par[u];
        }
        break;
      }
      for (auto v : e[u])
        if (dep[v] == n + 1) {
          dep[v] = dep[u] + 1;
          par[v] = u;
          q[t++] = v;
        }
    }
    if (((int)(ps).size()) == m + 1) return;
    output(ps);
  } else if (((int)(pc1).size()) == 0) {
    if (gao(1)) {
      output(ps);
    }
    return;
  } else {
    rt = pc1[0];
    for (int i = 1; i < n + 1; i++) vis[i] = 0, isr[i] = 0;
    for (auto v : e[rt]) {
      isr[v] = 1;
      e[v].erase(find((e[v]).begin(), (e[v]).end(), rt));
    }
    for (int i = 1; i < n + 1; i++)
      if (dep[i] == n + 1 && i != rt) {
        if (gao(i)) {
          output(ps);
          return;
        }
      }
    assert(((int)(e[rt]).size()) >= 4);
    int tt = 0;
    for (auto v : e[rt])
      if (!vis[v]) {
        lef.clear();
        vec.clear();
        totd = 0;
        dfs(v, -1);
        if (((int)(lef).size()) <= 3)
          pz[tt++] = make_pair(lef[0], lef[1]);
        else {
          bool suc = 0;
          for (auto u : vec)
            if (isr[u] >= 2 && ((int)(lef).size()) - isr[u] >= 2) {
              suc = 1;
              vector<int> v1, v2;
              for (auto v : lef) {
                if (l[u] <= l[v] && r[v] <= r[u])
                  v1.push_back(v);
                else
                  v2.push_back(v);
              }
              pz[tt++] = make_pair(v1[0], v1[1]);
              pz[tt++] = make_pair(v2[0], v2[1]);
              break;
            }
          if (!suc) {
            pz[tt++] = make_pair(lef[0], lef[1]);
          }
        }
      }
    if (tt >= 2) {
      vector<int> r;
      r.push_back(rt);
      for (int i = 1; i < n + 1; i++) vis[i] = 0;
      findp(pz[0].first, 0, pz[0].second);
      for (auto x : ps) r.push_back(x);
      for (int i = 1; i < n + 1; i++) vis[i] = 0;
      findp(pz[1].first, 0, pz[1].second);
      for (auto x : ps) r.push_back(x);
      if (((int)(r).size()) != n) {
        output(r);
      } else {
        return;
      }
    } else {
      return;
    }
  }
}
int main() {
  for (scanf("%d", &_); _; _--) {
    suc = 0;
    solve();
    if (!suc) {
      puts("No");
    }
  }
}
