#include <bits/stdc++.h>
using std::abs;
using std::bitset;
using std::cerr;
using std::cin;
using std::cout;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::set;
using std::sort;
using std::string;
using std::swap;
using std::unordered_map;
using std::unordered_set;
using std::vector;
using ll = long long;
using uint = unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ull = unsigned long long;
using ld = long double;
template <typename T>
void _(const char* s, T h) {
  cerr << s << " = " << h << "\n";
}
template <typename T, typename... Ts>
void _(const char* s, T h, Ts... t) {
  int b = 0;
  while (((b += *s == '(') -= *s == ')') != 0 || *s != ',') cerr << *s++;
  cerr << " = " << h << ",";
  _(s + 1, t...);
}
struct init {
  init() {
    cin.tie(0);
    std::iostream::sync_with_stdio(0);
    cout << std::fixed << std::setprecision(10);
    cerr << std::fixed << std::setprecision(5);
  }
} init;
template <typename T, typename U>
void upx(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
void upn(T& x, U y) {
  if (x > y) x = y;
}
const ll N = 5e5 + 5;
vector<ll> g[N];
ll u[N];
ll vis = 0;
void dfs(ll v) {
  u[v] = 1;
  ;
  vis++;
  for (ll to : g[v]) {
    if (!u[to]) dfs(to);
  }
}
ll n, m;
ll fl;
void output(const vector<ll>& ans) {
  if (ans.size() == n || ans.size() == 0) {
    cout << "No\n";
  } else {
    cout << "Yes\n";
    cout << ans.size() << '\n';
    for (ll i : ans) cout << i << ' ';
    cout << '\n';
  }
}
vector<ll> way;
bool fnd(ll v) {
  u[v] = 2;
  way.emplace_back(v);
  vector<ll> qqq;
  qqq.push_back(v);
  vector<ll> pr(n + 1, -1);
  ll lst = 0;
  ll mem = -1;
  while (qqq.size() > lst) {
    ll vv = qqq[lst++];
    for (auto i : g[vv]) {
      if (u[i] != 2) {
        qqq.push_back(i);
        if (mem == -1 && g[i].size() % 3 == 1) mem = i;
        u[i] = 2;
        pr[i] = vv;
      }
    }
  }
  ll gd = (mem != -1);
  while (mem != -1) {
    way.push_back(mem);
    mem = pr[mem];
  }
  return gd;
}
ll rem[N];
void doans(vector<ll>& ans) {
  for (ll i = 1; i <= n; ++i)
    if (!rem[i]) ans.emplace_back(i);
}
vector<ll> g2[N];
ll dt[N];
ll col[N];
ll up[N];
ll curcol;
ll solved;
void dfs2(ll v, ll fr, ll dep = 0) {
  col[v] = curcol;
  dt[v] = dep;
  up[v] = fr;
  ll zhopa = -1;
  for (ll to : g2[v]) {
    if (!col[to]) {
    } else if (fr != to) {
      if (zhopa == -1 || dt[to] > dt[zhopa]) {
        zhopa = to;
      }
    }
  };
  if (!solved && zhopa != -1) {
    solved = 1;
    ll curv = v;
    while (curv != zhopa) {
      rem[curv] = 1;
      curv = up[curv];
    }
    rem[zhopa] = 1;
  }
  for (ll to : g2[v]) {
    if (!col[to]) {
      dfs2(to, v, dep + 1);
    }
  }
}
vector<ll> idet[N];
ll qwe[N];
bool ebat(ll v, ll tar, ll co) {
  qwe[v] = 1;
  vector<ll> qq;
  vector<ll> prr(n + 1, -1);
  ll lst = 0;
  qq.push_back(v);
  while (lst < qq.size()) {
    ll vv = qq[lst++];
    for (auto i : g[vv]) {
      if (col[i] == co && !qwe[i]) {
        qq.push_back(i);
        prr[i] = vv;
        qwe[i] = 1;
      }
    }
  }
  if (prr[tar] != -1) {
    ll nw = tar;
    while (prr[nw] != -1) {
      way.push_back(nw);
      nw = prr[nw];
    }
    way.push_back(nw);
    return 1;
  }
  return 0;
}
ll us111[N];
vector<ll> v2;
int32_t main() {
  ll te;
  cin >> te;
  while (te--) {
    vis = 0;
    ;
    cin >> n >> m;
    way.clear();
    for (ll i = 1; i <= n; ++i) {
      rem[i] = 0;
      u[i] = 0;
      g[i].clear();
      g2[i].clear();
      idet[i].clear();
      qwe[i] = 0;
      col[i] = 0;
      us111[i] = 0;
    }
    for (ll i = 0; i < (m); ++i) {
      ll a, b;
      cin >> a >> b;
      g[a].emplace_back(b);
      g[b].emplace_back(a);
    }
    dfs(1);
    if (vis != n) {
      ;
      vector<ll> ans;
      for (ll i = 1; i <= n; ++i)
        if (u[i]) ans.emplace_back(i);
      output(ans);
      continue;
    }
    solved = 0;
    for (ll i = 1; !solved && i <= n; ++i) {
      if (g[i].size() % 3 == 0) {
        ;
        vector<ll> ans;
        for (ll j = 1; j <= n; ++j)
          if (i != j) ans.emplace_back(j);
        output(ans);
        solved = 1;
      }
    }
    if (solved) continue;
    ll a = 0, b = 0;
    for (ll i = 1; i <= n; ++i) {
      if (g[i].size() % 3 == 1) {
        if (a)
          b = i;
        else
          a = i;
      }
    }
    if (a && b) {
      ;
      way.clear();
      fnd(a);
      for (ll i : way) {
        rem[i] = 1;
        ;
      }
      vector<ll> ans;
      doans(ans);
      output(ans);
      ;
      continue;
    }
    for (ll i = 1; i <= n; ++i) {
      for (ll to : g[i]) {
        if (g[i].size() % 3 == 2 && g[to].size() % 3 == 2) {
          g2[i].emplace_back(to);
          ;
        }
      }
    }
    curcol = 0;
    for (ll i = 1; !solved && i <= n; ++i) {
      if (g[i].size() % 3 == 2 && !col[i]) {
        curcol++;
        dfs2(i, i);
        if (solved) {
          ;
          vector<ll> ans;
          doans(ans);
          output(ans);
        }
      }
    }
    if (solved) continue;
    for (ll to : g[a]) {
      idet[col[to]].emplace_back(to);
    }
    for (ll i = 1; i <= n; ++i)
      ;
    v2.clear();
    for (ll i = 1; !solved && i <= curcol; ++i) {
      if (idet[i].size() % 3 == 2) {
        v2.emplace_back(i);
      }
    }
    if (v2.size() >= 2) {
      ;
      ll x = v2[0];
      ll y = v2[1];
      {
        way.clear();
        for (ll i = 1; i <= n; ++i) qwe[i] = 0;
        ll h1 = idet[x][0];
        ll h2 = idet[x][1];
        ebat(h1, h2, x);
        ;
        for (ll i = 0; i < idet[x].size(); i++) {
          ll v = idet[x][i];
          us111[v] = 1;
        }
        ll koll = 0;
        for (ll i : way) {
          rem[i] = 1;
          ;
          koll += us111[i];
          if (koll >= 2) break;
        }
      }
      {
        way.clear();
        for (ll i = 1; i <= n; ++i) qwe[i] = 0;
        ll h1 = idet[y][0];
        ll h2 = idet[y][1];
        ll ewq = ebat(h1, h2, y);
        ;
        ;
        for (ll i = 0; i < idet[y].size(); i++) {
          ll v = idet[y][i];
          us111[v] = 1;
        }
        ll koll = 0;
        for (ll i : way) {
          rem[i] = 1;
          ;
          koll += us111[i];
          if (koll >= 2) break;
        }
      }
      rem[a] = 1;
      ;
      vector<ll> ans;
      doans(ans);
      output(ans);
      continue;
    }
    cout << "No\n";
  }
  return 0;
}
