upper,lower,n,m = 0,0,0,0
graph = []
deg = []
depth = []
parent = []
q = []
pred = []
keep = []
mod = []

def dfs(v):
    global lower
    global upper
    r = 0
    for u in graph[v]:
        if parent[v] != u and deg[u] % 3 == 2:
            if depth[u]:
                lower = lower if lower else v
                upper = upper if upper else u
                r = 1
            else:
                depth[u] = depth[v] + 1
                parent[u] = v
                r |= dfs(u)
    return r

def forest():
    r = 1
    for v in mod[2]:
        if depth[v] == 0:
            parent[v] = -1
            depth[v] = 1
            if dfs(v):
                r = 0
    return r

def answer():
    keep.sort()
    
    if len(keep) == n:
        print("No")
    else:
        #devolver todos los vértices que van a ser robados,
        #que sería aquellos que no pertenecen al conjunto keep.
        print("Yes")
        print(n - len(keep))
        k = n - len(keep)
        i = 1
        j = 0
        while k:
            while i <= n and j < len(keep) and keep[j] == i:
                i += 1
                j += 1
                
            if k == 1:
                print(i)
            else:
                 print(i, end=' ')
            k -= 1
            i += 1
    
def solve():
    global n
    global m
    global upper
    global lower
    
    for _ in range(m):
        u,v = map(int,input().split())
        graph[u].append(v)
        graph[v].append(u)
        deg[u] += 1
        deg[v] += 1
        
    for i in range(1,n+1):
        mod[deg[i]%3].append(i)

    if n == 1:
        print("No")

    elif len(mod[0]) > 0:
        x = mod[0][0]
        print("Yes")
        print(n-1)
        for i in range(1,n):
            v = i + 1 if i >= x else i
            if i + 1 == n:
                print(v)
            else:
                print(v,end=' ')

    elif not forest():
        keep.append(upper)
        keep.append(lower)
        
        #guardar todos los vértices del ciclo
        i = parent[lower]
        x = 0
        y = 0
        print('aqui')
        while i != upper:
            keep.append(i)
            y = depth[i]
            for v in graph[i]:
                if y > depth[v] and depth[v] >= depth[upper]:
                    x = v
                    y = depth[v]
            i = x
            
        answer()

    elif len(mod[1]) == 0:
        print("No")

    elif len(mod[1]) >= 2:
        pred[mod[1][0]] = -1
        #cola queue
        q[0] = mod[1][0]
        
        i = 0
        j = 1
        k = q[0]
        while i < j:
            if i and deg[k] % 3 == 1:
                t = k
                break
            for v in graph[k]:
                if pred[v] == 0:
                    pred[v] = k
                    q[j] = v
                    j += 1
            i += 1
            k = q[i]

        #guardar los vértices del camino 
        i = t
        while ~i:
            keep.append(i)
            i = pred[i]
            
        answer()

    else:
        keep.append(mod[1][0])
        fst = graph[mod[1][0]][0]
        pred[fst] = -1
        q[0] = fst
        last = 0

        i = 0
        j = 1
        k = q[0]
        while i < j:
            for v in graph[k]:
                if pred[v] == 0:
                    if v == mod[1][0]:
                        last = last if (last or (not i) ) else k
                    else:
                        pred[v] = k
                        q[j] = v
                        j += 1
            i += 1
            k = q[i]

        #agregar los vértices del primer camino   
        i = last
        while ~i:
            keep.append(i)
            i = pred[i]

        #encontrar el otro camino
        for v in graph[mod[1][0]]:
            if  pred[v] == 0:
                fst = v
                break

        last = 0
        pred[fst] = -1
        q[0] = fst
        i = 0
        j = 1
        k = q[0]
        while i < j:
            for v in graph[k]:
                if pred[v] == 0:
                    if v == mod[1][0]:
                        last = last if (last or (not i)) else k
                    else:
                        pred[v] = k
                        q[j] = v
                        j += 1
            i += 1
            k = q[i]
            
        i = last
        while ~i:
            keep.append(i)
            i = pred[i]

        answer()
        
        
T = int(input())

for i in range(T):
    upper = 0
    lower = 0
    n, m = map(int,input().split())
    graph = [[] for _ in range(n + 1)]
    deg = [0 for _ in range(n + 1)]
    q = [0 for _ in range(n + 1)]
    pred = [0 for _ in range(n + 1)]
    depth = [0 for _ in range(n + 1)]
    parent = [0 for _ in range(n + 1)]
    keep = []
    mod = [[] for _ in range(3)]
    solve()
    if i != T - 1:
        _ = input()
