#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > edges(n);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    edges[a].push_back(b);
    edges[b].push_back(a);
  }
  for (int i = 0; i < n; i++) {
    if (edges[i].size() % 3 == 0) {
      cout << "Yes" << '\n';
      cout << n - 1 << '\n';
      for (int j = 0; j < n; i++)
        if (j != i) cout << j + 1 << ' ';
      cout << '\n';
      return;
    }
  }
  if (n <= 3) {
    cout << "No" << '\n';
  } else {
    cout << "Yes" << '\n';
    cout << 3 << '\n';
    cout << n - 2 << ' ' << n - 1 << ' ' << n << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) solve();
}
