#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int i, j, k, l = 0, t, n;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    scanf("%d %d", &n, &k);
    int a[n];
    for (j = 0; j < n; j++) {
      scanf("%d", &a[j]);
      if (a[j] <= 0)
        l++;
    }
    if (l >= k)
      printf("NO\n");
    else
      printf("YES\n");
    l = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    123b <main+0x11b>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
lea    -0x1c(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11f6 <main+0xd6>
mov    -0x38(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x38(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jg     11e3 <main+0xc3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e8 <main+0xc8>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    119f <main+0x7f>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1213 <main+0xf3>
lea    0xdfd(%rip),%rdi
call   1030 <printf@plt>
jmp    121f <main+0xff>
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    -0x30(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,-0x30(%rbp)
jle    11fe <main+0xde>
lea    0xeaf(%rip),%r13
xor    %r12d,%r12d
jmp    1189 <main+0x69>
nopl   0x0(%rax)
cmp    -0x34(%rbp),%r15d
lea    0xe9f(%rip),%rdi
lea    0xe94(%rip),%rax
cmovl  %rax,%rdi
call   1030 <puts@plt>
mov    -0x40(%rbp),%rsp
add    $0x1,%r12d
cmp    -0x30(%rbp),%r12d
jge    11fe <main+0xde>
xor    %r15d,%r15d
lea    0xe6d(%rip),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x34(%rbp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    1160 <main+0x40>
xor    %r14d,%r14d
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0x0,(%rbx)
setle  %al
add    %eax,%r15d
add    $0x1,%r14
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r14
jl     11d0 <main+0xb0>
jmp    1160 <main+0x40>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [4 x i8] c"NO\0A\00"
@.str.3 = [5 x i8] c"YES\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %5
%10 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %2
br label %11
11: ; preds = %52, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %55
15: ; preds = %11
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %4)
%17 = load i32, i32* %7
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %8
%20 = alloca i32, i64 %18
store i64 %18, i64* %9
store i32 0, i32* %3
br label %21
21: ; preds = %39, %15
%22 = load i32, i32* %3
%23 = load i32, i32* %7
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %42
25: ; preds = %21
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %20, i64 %27
%29 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %28)
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %20, i64 %31
%33 = load i32, i32* %32
%34 = icmp sle i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %25
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %38
38: ; preds = %35, %25
br label %39
39: ; preds = %38
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %21
42: ; preds = %21
%43 = load i32, i32* %5
%44 = load i32, i32* %4
%45 = icmp sge i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %50
48: ; preds = %42
%49 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
store i32 0, i32* %5
%51 = load i8*, i8** %8
br label %52
52: ; preds = %50
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
br label %11
55: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@str = [4 x i8] c"YES\00"
@str.4 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %41
10: ; preds = %0, %32
%11 = phi i32 [ %38, %32 ], [ 0, %0 ]
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %1)
%13 = load i32, i32* %3
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
%16 = alloca i32, i64 %14
%17 = load i32, i32* %3
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %32
19: ; preds = %10, %19
%20 = phi i64 [ %28, %19 ], [ 0, %10 ]
%21 = phi i32 [ %27, %19 ], [ 0, %10 ]
%22 = getelementptr inbounds i32, i32* %16, i64 %20
%23 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %22)
%24 = load i32, i32* %22
%25 = icmp slt i32 %24, 1
%26 = zext i1 %25 to i32
%27 = add nuw nsw i32 %21, %26
%28 = add nuw nsw i64 %20, 1
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = icmp slt i64 %28, %30
br i1 %31, label %19, label %32
32: ; preds = %19, %10
%33 = phi i32 [ 0, %10 ], [ %27, %19 ]
%34 = load i32, i32* %1
%35 = icmp slt i32 %33, %34
%36 = select i1 %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0)
%37 = call i32 @puts(i8* dereferenceable(1) %36)
%38 = add nuw nsw i32 %11, 1
%39 = load i32, i32* %2
%40 = icmp slt i32 %38, %39
br i1 %40, label %10, label %41
41: ; preds = %32, %0
ret i32 0
}