#include <bits/stdc++.h>
int T, n, m, head[500001], nxt[1000001], b[1000001], d[500001], k, cnt[3];
int dis[500001], q[500001], h, t, pre[500001], Nxt[500001], sum[500001], p;
bool vis[500001], ans[500001];
void push(int s, int t) {
  nxt[++k] = head[s];
  head[s] = k;
  b[k] = t;
}
int dfs(int x, int f) {
  printf("dfs %d %d\n", x, f);
  Nxt[x] = 0;
  for (int i = head[x]; i; i = nxt[i])
    if (b[i] != p && b[i] != f) {
      Nxt[x] = b[i];
      return dfs(b[i], x) + vis[x];
    }
  return vis[x];
}
int dfn[500001], now, stk[500010], top;
int have;
void get(int x, int f) {
  if (have) return;
  stk[++top] = x;
  dfn[x] = ++now;
  int con = 0;
  for (int i = head[x]; i; i = nxt[i])
    if (!dfn[b[i]]) {
      get(b[i], x);
    } else if (b[i] != f) {
      if (!con || dfn[con] < dfn[b[i]]) con = b[i];
    }
  if (have) return;
  if (dfn[con] < dfn[x]) {
    for (int i = 1; i <= n; i++) ans[i] = 0;
    do {
      ans[stk[top]] = 1;
      --top;
    } while (stk[top + 1] != con);
    have = 1;
    return;
  }
  --top;
}
void solve() {
  scanf("%d%d", &n, &m);
  if (n <= 2) {
    puts("No");
    return;
  }
  for (int i = 1; i <= n; i++) head[i] = d[i] = 0;
  k = 0;
  for (int i = 1, u, v; i <= m; i++)
    scanf("%d%d", &u, &v), ++d[u], ++d[v], push(u, v), push(v, u);
  for (int i = 0; i < 3; i++) cnt[i] = 0;
  for (int i = 1; i <= n; i++) ++cnt[d[i] % 3];
  if (cnt[0]) {
    for (int i = 1; i <= n; i++)
      if (d[i] % 3 == 0) {
        printf("Yes\n%d\n", n - 1);
        for (int j = 1; j <= n; j++)
          if (i != j) printf("%d ", j);
        putchar('\n');
        return;
      }
  }
  if (cnt[1] > 1) {
    h = t = 0;
    for (int i = 1; i <= n; i++) dis[i] = -1, pre[i] = 0;
    int p = 0;
    for (int i = 1; i <= n; i++)
      if (d[i] % 3 == 1) {
        p = i;
        break;
      }
    q[++t] = p;
    dis[p] = 0;
    while (h < t) {
      ++h;
      for (int i = head[q[h]]; i; i = nxt[i])
        if (!~dis[b[i]]) {
          dis[b[i]] = dis[q[h]] + 1;
          pre[b[i]] = q[h];
          q[++t] = b[i];
          if (d[b[i]] % 3 == 1) {
            if (dis[b[i]] == n - 1) {
              puts("No");
              return;
            } else {
              printf("Yes\n%d\n", n - dis[b[i]] - 1);
              for (int j = 1; j <= n; j++) vis[j] = 0;
              for (int j = b[i]; j; j = pre[j]) vis[j] = 1;
              for (int j = 1; j <= n; j++)
                if (!vis[j]) printf("%d ", j);
              putchar('\n');
              return;
            }
          }
        }
    }
  }
  p = 0;
  for (int i = 1; i <= n; i++) vis[i] = 0, dis[i] = -1, pre[i] = 0;
  for (int i = 1; i <= n; i++)
    if (d[i] % 3 == 1) p = i;
  for (int i = head[p]; i; i = nxt[i]) --d[b[i]];
  vis[p] = 1;
  h = t = 0;
  for (int i = 1; i <= n; i++)
    if (i != p && d[i] == 1) q[++t] = i;
  while (h < t) {
    ++h;
    vis[q[h]] = 1;
    for (int i = head[q[h]]; i; i = nxt[i])
      if (b[i] != p) {
        --d[b[i]];
        if (d[b[i]] == 1 && !vis[b[i]]) q[++t] = b[i];
      }
  }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      h = t = 0;
      q[++t] = i;
      int start = i;
      now = 0;
      get(i, 0);
      int cnt = 0;
      for (int j = 1; j <= n; j++)
        if (!ans[i]) ++cnt;
      printf("Yes\n%d\n", cnt);
      for (int j = 1; j <= n; j++)
        if (!ans[j]) printf("%d ", j);
      putchar('\n');
      return;
    }
  for (int i = 1; i <= n; i++) d[i] = vis[i] = 0;
  for (int i = 1; i <= n; i++)
    if (i != p)
      for (int j = head[i]; j; j = nxt[j]) ++d[b[j]];
    else
      for (int j = head[i]; j; j = nxt[j]) vis[b[j]] = 1;
  for (int i = 1, last = 0; i <= n; i++)
    if (d[i] == 1) {
      int now = dfs(i, 0);
      if (now >= 4) {
        for (int j = 1; j <= n; j++) ans[j] = 0;
        int cnt = n;
        ans[p] = 1, --cnt;
        for (int j = i, k = 0;; j = Nxt[j]) {
          ans[j] = 1, --cnt;
          k += vis[j];
          if (k == 4) break;
        }
        printf("Yes\n%d\n", cnt);
        for (int j = 1; j <= n; j++)
          if (!ans[j]) printf("%d ", j);
        return;
      } else if (last) {
        for (int j = 1; j <= n; j++) ans[j] = 0;
        int cnt = n;
        ans[p] = 1, --cnt;
        for (int j = i, k = 0;; j = Nxt[j]) {
          ans[j] = 1, --cnt;
          k += vis[j];
          if (k == 2) break;
        }
        for (int j = last, k = 0;; j = Nxt[j]) {
          ans[j] = 1, --cnt;
          k += vis[j];
          if (k == 2) break;
        }
        printf("Yes\n%d\n", cnt);
        for (int j = 1; j <= n; j++)
          if (!ans[j]) printf("%d ", j);
        return;
      }
      last = i;
    }
  puts("No");
}
int main() {
  scanf("%d", &T);
  for (int fd = 1; fd <= T; fd++) solve();
}
