#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 t;
  scanf("%d", &t);
  for (int a0 = 0; a0 < t; a0++) {
    int n;
    int k;
    int j = 0;
    scanf("%d %d", &n, &k);
    int a[n];
    for (int a_i = 0; a_i < n; a_i++) {
      scanf("%d", &a[a_i]);
      if (a[a_i] <= 0)
        j++;
    }
    if (j >= k) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1234 <main+0x114>
movl   $0x0,-0x18(%rbp)
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f6 <main+0xd6>
mov    -0x38(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jg     11e3 <main+0xc3>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e8 <main+0xc8>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    119f <main+0x7f>
mov    -0x18(%rbp),%eax
cmp    -0x14(%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>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x28>
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 i8*
%8 = alloca i64
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %11
11: ; preds = %52, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %55
15: ; preds = %11
store i32 0, i32* %6
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
%17 = load i32, i32* %4
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %7
%20 = alloca i32, i64 %18
store i64 %18, i64* %8
store i32 0, i32* %9
br label %21
21: ; preds = %39, %15
%22 = load i32, i32* %9
%23 = load i32, i32* %4
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %42
25: ; preds = %21
%26 = load i32, i32* %9
%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* %9
%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* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %38
38: ; preds = %35, %25
br label %39
39: ; preds = %38
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
store i32 %41, i32* %9
br label %21
42: ; preds = %21
%43 = load i32, i32* %6
%44 = load i32, i32* %5
%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
%51 = load i8*, i8** %7
br label %52
52: ; preds = %50
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
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 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
br label %12
11: ; preds = %21, %0
ret i32 0
12: ; preds = %8, %21
%13 = phi i32 [ 0, %8 ], [ %27, %21 ]
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
%18 = alloca i32, i64 %16
%19 = load i32, i32* %2
%20 = icmp sgt i32 %19, 0
br i1 %20, label %30, label %21
21: ; preds = %30, %12
%22 = phi i32 [ 0, %12 ], [ %38, %30 ]
%23 = load i32, i32* %3
%24 = icmp slt i32 %22, %23
%25 = select i1 %24, 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)
%26 = call i32 @puts(i8* dereferenceable(1) %25)
%27 = add nuw nsw i32 %13, 1
%28 = load i32, i32* %1
%29 = icmp slt i32 %27, %28
br i1 %29, label %12, label %11
30: ; preds = %12, %30
%31 = phi i64 [ %39, %30 ], [ 0, %12 ]
%32 = phi i32 [ %38, %30 ], [ 0, %12 ]
%33 = getelementptr inbounds i32, i32* %18, i64 %31
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %33)
%35 = load i32, i32* %33
%36 = icmp slt i32 %35, 1
%37 = zext i1 %36 to i32
%38 = add nuw nsw i32 %32, %37
%39 = add nuw nsw i64 %31, 1
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %39, %41
br i1 %42, label %30, label %21
}