<gh_stars>0
#!/bin/python3

import sys


t = int(input().strip())
for a0 in range(t):
    n, k = input().strip().split(' ')
    n, k = [int(n), int(k)]
    a = [int(a_temp) for a_temp in input().strip().split(' ')]
    arrived = [i for i in a if i <= 0]
    print('YES' if len(arrived) < k else 'NO')

#!/bin/python3

import sys


t = int(input().strip())
for a0 in range(t):
    n, k = input().strip().split(' ')
    n, k = [int(n), int(k)]
    a = [int(a_temp) for a_temp in input().strip().split(' ')]
    arrived = [i for i in a if i <= 0]
    print('YES' if len(arrived) < k else 'NO')
#!/bin/python3