#include <bits/stdc++.h>
using namespace std;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
string direc = "URDL";
const long long MOD2 = (long long)1000000007 * (long long)1000000007;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 1000000007) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
vector<int> mp[500135], path, ans, vp[2];
bool vis[500135], sv[500135];
int A;
void clr() {
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    mp[i].clear();
    vis[i] = 0;
    sv[i] = 0;
  }
}
void dfs(int x, int pa, int tar) {
  path.push_back(x);
  if (x != tar && mp[x].size() % 3 == 1) throw 1;
  for (int c : mp[x])
    if (c != pa) dfs(c, x, tar);
  path.pop_back();
}
void dfs2(int x, int pa) {
  vis[x] = 1;
  path.push_back(x);
  for (int c : mp[x])
    if (c != pa) {
      if (!vis[c] && mp[c].size() % 3 == 2)
        dfs2(c, x);
      else if (vis[c]) {
        while (path.back() != c) {
          ans.push_back(path.back());
          path.pop_back();
        }
        ans.push_back(c);
        throw 1;
      }
    }
  path.pop_back();
}
void dfs3(int x, int pa, int W) {
  vis[x] = 1;
  vp[W].push_back(x);
  for (int c : mp[x])
    if (c != pa) {
      if (c == A) throw 1;
      if (!vis[c]) dfs3(c, x, W);
    }
  vp[W].pop_back();
}
void ppt() {
  puts("Yes");
  vector<int> vv;
  for (int(i) = 1; (i) <= (int)(n); (i)++)
    if (!sv[i]) vv.push_back(i);
  printf("%d\n", vv.size());
  for (int z : vv) printf("%d ", z);
  puts("");
}
void fmain(int tid) {
  scanf("%d%d", &n, &m);
  for (int i = 0, u, v; i < m; i++) {
    scanf("%d%d", &u, &v);
    mp[u].push_back(v);
    mp[v].push_back(u);
  };
  if (n == 1) {
    puts("No");
    return;
  }
  vector<int> ones;
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    if (mp[i].size() % 3 == 0) {
      sv[i] = 1;
      ppt();
      return;
    } else if (mp[i].size() % 3 == 1)
      ones.push_back(i);
  }
  for (int(i) = 1; (i) <= (int)(n); (i)++)
    if (mp[i].size() % 3 == 2 && !vis[i]) {
      path.clear();
      ans.clear();
      try {
        dfs2(i, 0);
      } catch (int ee) {
        if (ans.size() == n) {
          puts("No");
          return;
        }
        for (int z : ans) sv[z] = 1;
        ppt();
        return;
      }
    }
  if (ones.size() >= 2) {
    path.clear();
    try {
      dfs(ones[0], 0, ones[0]);
    } catch (int ee) {
    }
    if (path.size() == n) {
      puts("No");
      return;
    }
    for (int z : path) sv[z] = 1;
    ppt();
    return;
  }
  for (int(i) = 1; (i) <= (int)(n); (i)++) vis[i] = 0;
  for (int(j) = 0; (j) < (int)(2); (j)++) vp[j].clear();
  A = ones[0];
  vis[A] = 1;
  try {
    dfs3(mp[A][0], A, 0);
  } catch (int ee) {
  }
  for (int c : mp[A])
    if (!vis[c]) {
      try {
        dfs3(c, A, 1);
      } catch (int ee) {
      }
      break;
    }
  if (vp[0].size() + vp[1].size() + 1 == n) {
    puts("No");
    return;
  }
  sv[A] = 1;
  for (int z : vp[0]) sv[z] = 1;
  for (int z : vp[1]) sv[z] = 1;
  ppt();
}
int main() {
  int t = 1;
  scanf("%d", &t);
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
    clr();
  }
  return 0;
}
