#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class t, class u>
void chmax(t& first, u second) {
  if (first < second) first = second;
}
template <class t, class u>
void chmin(t& first, u second) {
  if (second < first) first = second;
}
template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;
using pi = pair<ll, ll>;
using vi = vc<ll>;
template <class t, class u>
ostream& operator<<(ostream& os, const pair<t, u>& p) {
  return os << "{" << p.first << "," << p.second << "}";
}
template <class t>
ostream& operator<<(ostream& os, const vc<t>& v) {
  os << "{";
  for (auto e : v) os << e << ",";
  return os << "}";
}
using uint = unsigned;
using ull = unsigned long long;
template <ll i, class T>
void print_tuple(ostream&, const T&) {}
template <ll i, class T, class H, class... Args>
void print_tuple(ostream& os, const T& t) {
  if (i) os << ",";
  os << get<i>(t);
  print_tuple<i + 1, T, Args...>(os, t);
}
template <class... Args>
ostream& operator<<(ostream& os, const tuple<Args...>& t) {
  os << "{";
  print_tuple<0, tuple<Args...>, Args...>(os, t);
  return os << "}";
}
void print(ll x, ll suc = 1) {
  cout << x;
  if (suc == 1) cout << "\n";
  if (suc == 2) cout << " ";
}
ll read() {
  ll i;
  cin >> i;
  return i;
}
vi readvi(ll n, ll off = 0) {
  vi v(n);
  for (ll i = ll(0); i < ll(n); i++) v[i] = read() + off;
  return v;
}
template <class T>
void print(const vector<T>& v, ll suc = 1) {
  for (ll i = ll(0); i < ll(v.size()); i++)
    print(v[i], i == ll(v.size()) - 1 ? suc : 2);
}
string readString() {
  string s;
  cin >> s;
  return s;
}
template <class T>
T sq(const T& t) {
  return t * t;
}
void yes(bool = true) {
  cout << "Yes"
       << "\n";
}
void no(bool = true) {
  cout << "No"
       << "\n";
}
constexpr ll ten(ll n) { return n == 0 ? 1 : ten(n - 1) * 10; }
const ll infLL = LLONG_MAX / 3;
const ll inf = infLL;
ll topbit(signed t) { return t == 0 ? -1 : 31 - __builtin_clz(t); }
ll topbit(ll t) { return t == 0 ? -1 : 63 - __builtin_clzll(t); }
ll botbit(signed first) { return first == 0 ? 32 : __builtin_ctz(first); }
ll botbit(ll first) { return first == 0 ? 64 : __builtin_ctzll(first); }
ll popcount(signed t) { return __builtin_popcount(t); }
ll popcount(ll t) { return __builtin_popcountll(t); }
bool ispow2(ll i) { return i && (i & -i) == i; }
ll mask(ll i) { return (ll(1) << i) - 1; }
bool inc(ll first, ll second, ll c) { return first <= second && second <= c; }
template <class t>
void mkuni(vc<t>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
ll rand_int(ll l, ll r) {
  static random_device rd;
  static mt19937_64 gen(rd());
  return uniform_int_distribution<ll>(l, r)(gen);
}
void answer(ll n, vi rem) {
  if (n == (ll)rem.size()) {
    return no(0);
  }
  assert(rem.size());
  vi has(n, 1);
  for (auto i : rem) has[i] = 0;
  vi ans;
  for (ll i = ll(0); i < ll(n); i++)
    if (has[i]) ans.push_back(i + 1);
  yes(0);
  assert(ans.size());
  print(ans.size());
  print(ans);
}
struct unionfind {
  vi p, s;
  ll c;
  unionfind(ll n) : p(n, -1), s(n, 1), c(n) {}
  ll find(ll first) {
    return p[first] == -1 ? first : (p[first] = find(p[first]));
  }
  bool unite(ll first, ll second) {
    first = find(first);
    second = find(second);
    if (first == second) return false;
    p[second] = first;
    s[first] += s[second];
    c--;
    return true;
  }
  bool same(ll first, ll second) { return find(first) == find(second); }
  ll sz(ll first) { return s[find(first)]; }
};
template <class N, class E>
struct treedp {
  const vvc<E>& g;
  vvc<N> dp1, dp2;
  vc<N> res;
  N dfs1(ll v, ll p) {
    N tmp;
    tmp.init(v);
    dp1[v].push_back(tmp);
    E up;
    for (auto e : g[v])
      if (e != p)
        dp1[v].push_back(dfs1(e, v));
      else
        up = e;
    dp2[v] = dp1[v];
    for (ll i = ll(1); i < ll(dp2[v].size()); i++)
      dp2[v][i] = dp2[v][i - 1] + dp2[v][i];
    if (p == -1)
      return N();
    else
      return dp2[v].back().up(up);
  }
  void dfs2(ll v, ll p, N cur) {
    res[v] = cur + dp2[v].back();
    for (ll i = ll(g[v].size()) - 1; i >= ll(0); i--) {
      auto e = g[v][i];
      if (e == p) continue;
      dp2[v].pop_back();
      dfs2(e, v, (cur + dp2[v].back()).up(e));
      cur = cur + dp1[v].back();
      dp1[v].pop_back();
    }
  }
  treedp(const vvc<E>& gg)
      : g(gg), dp1(g.size()), dp2(g.size()), res(g.size()) {
    dfs1(0, -1);
    N tmp;
    tmp.init(0);
    dfs2(0, -1, tmp);
  }
};
vi val;
struct N {
  ll v;
  pi first, second;
  void init(ll vv) {
    v = val[vv];
    first = pi(-1, -1);
    second = pi(-1, -1);
  }
  N up(ll to) const {
    ll x = v, y = -1;
    auto ch = [&](ll i) {
      if (i != -1) swap(x, i);
      if (i != -1) swap(y, i);
    };
    ch(first.first);
    ch(first.second);
    ch(second.first);
    ch(second.second);
    return N{val[to], pi(y, x), pi(-1, -1)};
  }
  N operator+(const N& r) const {
    N res = *this;
    auto ch = [&](pi i) {
      if (res.first < i) swap(res.first, i);
      if (res.second < i) swap(res.second, i);
    };
    ch(r.first);
    ch(r.second);
    return res;
  }
};
void slv() {
  ll n, m;
  cin >> n >> m;
  vvc<ll> g(n);
  vc<pi> es;
  for (ll _ = ll(0); _ < ll(m); _++) {
    ll u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
    es.emplace_back(u, v);
  }
  vi d(n);
  for (ll i = ll(0); i < ll(n); i++) d[i] = g[i].size() % 3;
  for (ll i = ll(0); i < ll(n); i++)
    if (d[i] == 0) return answer(n, {i});
  auto waf = [&](ll first, ll second) {
    queue<ll> q;
    vi pre(n, -1);
    auto rc = [&](ll v, ll p) {
      if (d[v] != 2) return;
      if (pre[v] != -1) return;
      pre[v] = p;
      q.push(v);
    };
    rc(first, -2);
    while (1) {
      ll v = q.front();
      q.pop();
      if (v == second) break;
      for (auto to : g[v]) rc(to, v);
    }
    if (pre[second] < 0) return vi{};
    vi res;
    while (second >= 0) {
      res.push_back(second);
      second = pre[second];
    }
    return res;
  };
  unionfind uf(n);
  {
    for (auto e : es) {
      ll first, second;
      tie(first, second) = e;
      if (d[first] != 2 || d[second] != 2) continue;
      if (uf.same(first, second)) {
        g[first].erase(find(g[first].begin(), g[first].end(), second));
        g[second].erase(find(g[second].begin(), g[second].end(), first));
        vi res = waf(first, second);
        return answer(n, res);
      } else
        uf.unite(first, second);
    }
  }
  ll first = -1;
  {
    ll second = -1;
    for (ll i = ll(0); i < ll(n); i++)
      if (d[i] == 1) {
        if (first == -1)
          first = i;
        else
          second = i;
      }
    if (second != -1) {
      vi tmp = d;
      d = vi(n, 2);
      vi res = waf(first, second);
      d = tmp;
      for (ll i = ll(1); i < ll(res.size()); i++) {
        if (d[res[i]] == 1) {
          res.resize(i + 1);
          break;
        }
      }
      return answer(n, res);
    }
  }
  if (first == -1) return no(0);
  vi cnt(n);
  for (auto to : g[first]) cnt[uf.find(to)]++;
  vi roots;
  for (ll i = ll(0); i < ll(n); i++)
    if (cnt[i] >= 2) {
      roots.push_back(i);
    }
  if (roots.size() == 0) return no(0);
  auto nei = [&](ll i) {
    for (auto to : g[i])
      if (to == first) return true;
    return false;
  };
  auto rectify = [&](vi p) {
    for (ll i = ll(1); i < ll(p.size()); i++) {
      if (nei(p[i])) {
        p.resize(i + 1);
        break;
      }
    }
    return p;
  };
  if (roots.size() == 1) {
    vi vs;
    for (ll i = ll(0); i < ll(n); i++)
      if (uf.same(i, roots[0])) vs.push_back(i);
    ll s = vs.size();
    val.assign(s, -1);
    for (ll i = ll(0); i < ll(s); i++)
      if (nei(vs[i])) val[i] = vs[i];
    vvc<ll> t(s);
    for (ll i = ll(0); i < ll(s); i++)
      for (auto to : g[vs[i]])
        t[i].push_back(lower_bound(vs.begin(), vs.end(), to) - vs.begin());
    auto res = treedp<N, ll>(t).res;
    for (ll i = ll(0); i < ll(s); i++)
      if (res[i].first.first >= 0 && res[i].second.first >= 0) {
        vi ans{first};
        vi p = rectify(waf(res[i].first.first, res[i].first.second));
        vi q = rectify(waf(res[i].second.first, res[i].second.second));
        ans.insert(ans.end(), p.begin(), p.end());
        ans.insert(ans.end(), q.begin(), q.end());
        return answer(n, ans);
      }
    return no(0);
  } else {
    pi z[2]{pi(-1, -1), pi(-1, -1)};
    for (auto to : g[first])
      for (ll k = ll(0); k < ll(2); k++)
        if (uf.find(to) == roots[k]) {
          if (z[k].first == -1)
            z[k].first = to;
          else
            z[k].second = to;
        }
    vi res{first};
    for (ll k = ll(0); k < ll(2); k++) {
      vi p = rectify(waf(z[k].first, z[k].second));
      res.insert(res.end(), p.begin(), p.end());
    }
    answer(n, res);
  }
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(20);
  ll t;
  cin >> t;
  for (ll _ = ll(0); _ < ll(t); _++) slv();
}
