#The solution in Python3 is as follows:
for _ in range(int(input())):
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=sum(1 for number in a if number<=0) #Count the no. of -ve numbers.
if s>=k:
print("NO")
else:
print("YES")
#Keep visiting for more solutions of HackerRank problems in Python 3.Thank you!!!