from collections import deque
from typing import List
import sys


def get_ints(): return map(int, sys.stdin.readline().strip().split())


N = 500005
visited = [False] * N
good = [False] * N
parent = [0] * N
h = [0] * N
adj: List[List[int]] = [[] for _ in range(N)]
q = deque()
degree = [0] * N

t_p: List[str] = []


def puts(string: str):
    t_p.append(string)


def dfs1(u: int):
    mx = -1
    visited[u] = True
    for v in adj[u]:
        if visited[v] and h[v] < h[u] - 1 and (mx == -1 or h[v] > h[mx]):
            mx = v
    if mx != -1 and h[u] - h[mx] + 1 < n and degree[mx] % 3 > 1:
        while u != parent[mx]:
            good[u] = True
            u = parent[u]
        return True
    for v in adj[u]:
        if not visited[v]:
            parent[v] = u
            h[v] = h[u] + 1
            if dfs1(v):
                return True
    return False


def dfs2(u: int):
    visited[u] = True
    for v in adj[u]:
        if not visited[v]:
            dfs2(v)


def has_3k_vertex():
    for i in range(n):
        if degree[i] % 3 == 0 and n > 1:
            good[i] = True
            return True
    return False


def has_121_path():
    parent[root] = -1
    visited[root] = True
    q.append(root)
    while len(q):
        u = q.popleft()
        if u != root and degree[u] % 3 == 1 and h[u] < n - 1:
            while u != -1:
                good[u] = True
                u = parent[u]
            q.clear()
            return True
        for v in adj[u]:
            if not visited[v]:
                visited[v] = True
                q.append(v)
                parent[v] = u
                h[v] = h[u] + 1


def has_2_cycle():
    parent[root if root < n else 0] = -1
    for i in range(n):
        visited[i] = False
    return dfs1(root if root < n else 0)


def has_122_components():
    flag = False
    for i in range(n):
        visited[i] = False
    visited[root] = good[root] = True
    # adj[root].sort(key=lambda a: h[a])
    for u in adj[root]:
        if not visited[u] and h[u] > 1:
            v = u
            good[u] = True
            while parent[v] != root:
                v = parent[v]
                good[v] = True
            if flag:
                break
            dfs2(v)
            flag = True
    return True


if __name__ == '__main__':
    s = int(input())
    while s > 0:
        # n, m = [int(a) for a in input().split(' ')]
        n, m = get_ints()
        for i in range(m):
            # u, v = [int(a) - 1 for a in input().split(' ')]
            u, v = get_ints()
            u -= 1
            v -= 1
            degree[u] += 1
            degree[v] += 1
            adj[u].append(v)
            adj[v].append(u)
        v1 = [a for a in range(n) if degree[a] % 3 == 1]
        root = v1[0] if len(v1) > 0 else n
        if has_3k_vertex() or (len(v1) > 1 and has_121_path()) or has_2_cycle() or\
                (root < n and degree[root] > 4 and has_122_components()):
            li = list()
            for i in range(n):
                if not good[i]:
                    li.append(str(i + 1))
            puts("Yes")
            puts(str(len(li)))
            puts(' '.join(li))
        else:
            puts('No')
        for i in range(n):
            adj[i].clear()
            visited[i] = good[i] = False
            parent[i] = degree[i] = h[i] = 0
        s -= 1
        if s != 0:
            input()
    sys.stdout.write('\n'.join(t_p))
