from typing import List


def print_solution(solution):
    for i in solution:
        can_pick[i] = False
    to_sol: List[str] = []
    for i in range(1, n + 1):
        if can_pick[i]:
            to_sol.append(str(i))
    if len(to_sol) == 0:
        print('No')
        return
    print('Yes')
    print(len(to_sol))
    print(' '.join(to_sol))


def nodes_1_22(i):
    path = []
    qi: List[int] = [0] * (n + 1)

    stack = []
    stack.append(i)

    one_node_1 = False

    while len(stack) > 0:
        u = stack[-1]
        if u != i:
            visited[u] = True
        if qi[u] >= len(adj[u]):
            stack.pop()
            continue
        v = adj[u][qi[u]]
        qi[u] += 1
        if parent[u] != v:
            if not visited[v]:
                if not (v == i and one_node_1):
                    parent[v] = u
                if v == 1:
                    if one_node_1:
                        x = u
                        while parent[x] != 0:
                            a = parent[x]
                            if x == i:
                                parent[x] = 0
                            path.append(x)
                            x = a
                        path.append(x)
                        print_solution(path)
                        return
                    else:
                        one_node_1 = True
                        visited[i] = False
                stack.append(v)


def nodes_2():
    path = []
    qi: List[int] = [0] * (n + 1)

    stack = []
    stack.append(1)

    while len(stack) > 0:
        u = stack[-1]
        visited[u] = True
        if qi[u] >= len(adj[u]):
            stack.pop()
            continue
        v = adj[u][qi[u]]
        qi[u] += 1
        if parent[u] != v:
            if not visited[v]:
                parent[v] = u
                stack.append(v)
            else:
                x = v
                path.append(x)
                x = u
                while x != v:
                    path.append(x)
                    x = parent[x]
                path.append(x)
                print_solution(path)
                return


def nodes_1(i):
    path = []
    qi: List[int] = [0] * (n + 1)

    stack = []
    stack.append(i)

    while len(stack) > 0:
        u = stack[-1]
        visited[u] = True
        if qi[u] == 0:
            for v in adj[u]:
                if len(adj[v]) % 3 == 1:
                    x = u
                    path.append(v)
                    while parent[x] != 0:
                        path.append(x)
                        x = parent[x]
                    path.append(x)
                    print_solution(path)
                    return
        if qi[u] >= len(adj[u]):
            stack.pop()
            continue
        v = adj[u][qi[u]]
        qi[u] += 1
        if parent[u] != v:
            if not visited[v]:
                parent[v] = u
                if len(adj[v]) % 3 == 1:
                    x = v
                    while parent[x] != 0:
                        path.append(x)
                        x = parent[x]
                    path.append(x)
                    print_solution(path)
                    return
                stack.append(v)




def nodes_0(i):
    print_solution([i])
    exit()


def solve():
    node_1 = -1
    for i in range(1, n + 1):
        if len(adj[i]) % 3 == 0:
            nodes_0(i)
            return
        if len(adj[i]) % 3 == 1:
            if node_1 != -1:
                nodes_1(node_1)
                return
            else:
                node_1 = i
    if node_1 == -1:
        nodes_2()
    else:
        nodes_1_22(node_1)


if __name__ == '__main__':
    q = int(input())
    for qi in range(q):
        n, m = [int(a) for a in input().split(' ')]
        adj: List[List[int]] = [[]] + [[] for _ in range(n)]
        can_pick: List[bool] = [False] + ([True] * n)
        parent: List[int] = [0] * (n + 1)
        visited: List[bool] = [False] * (n + 1)
        for mi in range(m):
            u, v = [int(a) for a in input().split(' ')]
            adj[u].append(v)
            adj[v].append(u)
        solve()
        if qi != q - 1:
            input()