#include <stdio.h>

#define gc getchar_unlocked
#define pc putchar_unlocked
inline int scan(){register int n=0,c=gc();while(c<'0'||c>'9')c=gc();while(c<='9'&&c>='0')n=(n<<1)+(n<<3)+c-'0',c=gc();return n;} 

int main(void){
    int i,t,n,k,x,count=0;
	t=scan();
    
	while(t--){
		n=scan();
		k=scan();
		while(n--){
			x=scan();
			if(x%2==0) count++;
		}//while
		if (count >= k) printf("\nYES");
		else printf("\nNO");
        count=0;
	}//while
 
 return 0;
}

//STDIN Input : 4 2 1 1 2 3 2 2 6 5 3 3 2 4 5 4 2 1 2 4 5