#include <bits/stdc++.h>
using namespace std;
vector<int> adjList[500000];
int parent[500000], visited[500000];
queue<int> Q;
int keep[500000];
int yes[500000];
vector<int> cycle;
int doDFS(int u, int p) {
  int i;
  visited[u] = 1, parent[u] = p;
  for (i = 0; i < adjList[u].size(); i++) {
    int v = adjList[u][i];
    if ((adjList[v].size() % 3) != 2) continue;
    if ((v != p) && (visited[v] == 1) && cycle.empty()) {
      int w = u;
      while ((w == p) ||
             !binary_search(adjList[u].begin(), adjList[u].end(), w))
        cycle.push_back(w), w = parent[w];
      cycle.push_back(w);
    }
  }
  for (i = 0; i < adjList[u].size(); i++) {
    int v = adjList[u][i];
    if ((adjList[v].size() % 3) != 2) continue;
    if (visited[v] == 0) doDFS(v, u);
  }
  visited[u] = 2;
  return 0;
}
int doDFS2(int u) {
  int i;
  int r = -1;
  visited[u] = 1;
  for (i = 0; i < adjList[u].size(); i++) {
    int v = adjList[u][i];
    if ((adjList[v].size() % 3) != 2) continue;
    if (!visited[v]) {
      parent[v] = u;
      int rr = doDFS2(v);
      if (rr != -1) r = rr;
    }
  }
  if (yes[u]) r = u;
  return r;
}
int main() {
  int i;
  int t, n, m;
  int a, b;
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d", &n, &m);
    for (i = 0; i < m; i++) {
      scanf("%d %d", &a, &b);
      a--, b--;
      adjList[a].push_back(b);
      adjList[b].push_back(a);
    }
    for (i = 0; i < n; i++) sort(adjList[i].begin(), adjList[i].end());
    for (i = 0; i < n; i++) {
      if ((adjList[i].size() % 3) == 0) break;
    }
    if (i < n) {
      if (n == 1)
        printf("No\n");
      else {
        int p = i;
        printf("Yes\n%d\n", n - 1);
        for (i = 0; i < n; i++) {
          if (i != p) printf("%d ", i + 1);
        }
        printf("\n");
      }
    } else {
      fill(visited, visited + n, 0), cycle.clear();
      for (i = 0; i < n; i++) {
        if (((adjList[i].size() % 3) == 2) && (visited[i] == 0)) {
          doDFS(i, -1);
          if (!cycle.empty()) break;
        }
      }
      if (cycle.empty()) {
        int a = -1, b = -1;
        for (i = 0; i < n; i++) {
          if ((adjList[i].size() % 3) == 1) {
            if (a == -1)
              a = i;
            else
              b = i;
          }
        }
        if (b == -1) {
          int c = 0;
          fill(visited, visited + n, 0), fill(keep, keep + n, 0),
              fill(yes, yes + n, 0);
          keep[a] = 1;
          for (i = 0; i < adjList[a].size(); i++) yes[adjList[a][i]] = 1;
          for (i = 0; i < adjList[a].size(); i++) {
            int v = adjList[a][i];
            if (!visited[v] && (c < 2)) {
              yes[v] = 0, b = doDFS2(v);
              while (b != v) keep[b] = 1, b = parent[b];
              keep[b] = 1;
              c++;
            }
          }
          c = 0;
          for (i = 0; i < n; i++) {
            if (!keep[i]) c++;
          }
          if (c == 0)
            printf("No\n");
          else {
            printf("Yes\n%d\n", c);
            for (i = 0; i < n; i++) {
              if (!keep[i]) printf("%d ", i + 1);
            }
            printf("\n");
          }
        } else {
          fill(parent, parent + n, -1), fill(keep, keep + n, 0);
          while (!Q.empty()) Q.pop();
          Q.push(a);
          while (!Q.empty()) {
            int u = Q.front();
            Q.pop();
            if ((u != a) && ((adjList[u].size() % 3) == 1)) {
              b = u;
              break;
            }
            for (i = 0; i < adjList[u].size(); i++) {
              int v = adjList[u][i];
              if ((v != a) && (parent[v] == -1)) {
                parent[v] = u;
                Q.push(v);
              }
            }
          }
          int d = 0;
          while (b != a) keep[b] = 1, b = parent[b], d++;
          keep[b] = 1, d++;
          if (d == n)
            printf("No\n");
          else {
            printf("Yes\n%d\n", n - d);
            for (i = 0; i < n; i++) {
              if (!keep[i]) printf("%d ", i + 1);
            }
            printf("\n");
          }
        }
      } else {
        fill(keep, keep + n, 0);
        for (i = 0; i < cycle.size(); i++) keep[cycle[i]] = 1;
        if (cycle.size() == n)
          printf("No\n");
        else {
          printf("Yes\n%d\n", n - cycle.size());
          for (i = 0; i < n; i++) {
            if (!keep[i]) printf("%d ", i + 1);
          }
          printf("\n");
        }
      }
    }
    for (i = 0; i < n; i++) adjList[i].clear();
  }
  return 0;
}
