#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 cases, i = 0, stime, studs, thres;
  scanf("%i", &cases);
  for (int a = 1; a <= cases; a++) {
    scanf("%i %i", &studs, &thres);
    for (int b = 1; b <= studs; b++) {
      scanf("%i", &stime);
      if (stime > thres)
        i = 1;
    }
    if (i == 0) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11f6 <main+0xd6>
lea    0xe9e(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11bc <main+0x9c>
lea    0xe78(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11a9 <main+0x89>
movl   $0x1,-0xc(%rbp)
jmp    11ae <main+0x8e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1178 <main+0x58>
cmpl   $0x0,-0xc(%rbp)
jne    11d7 <main+0xb7>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
jmp    11e3 <main+0xc3>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    11e8 <main+0xc8>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114f <main+0x2f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11e6 <main+0xc6>
mov    $0x1,%ebp
lea    0xeab(%rip),%r13
lea    0x14(%rsp),%rbx
mov    $0x1,%r14d
xor    %r12d,%r12d
jmp    1198 <main+0x78>
nopl   0x0(%rax,%rax,1)
test   %r12d,%r12d
lea    0xe8c(%rip),%rdi
lea    0xe89(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0x1(%r14),%eax
cmp    0xc(%rsp),%r14d
mov    %eax,%r14d
jge    11e6 <main+0xc6>
lea    0xe61(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1170 <main+0x50>
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    0x10(%rsp),%eax
cmovg  %ebp,%r12d
add    $0x1,%r15d
cmp    0x8(%rsp),%r15d
jl     11c0 <main+0xa0>
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [6 x i8] c"%i %i\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 i32
store i32 0, i32* %1
store i32 0, i32* %3
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %7
br label %10
10: ; preds = %38, %0
%11 = load i32, i32* %7
%12 = load i32, i32* %2
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %41
14: ; preds = %10
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %5, i32* %6)
store i32 1, i32* %8
br label %16
16: ; preds = %27, %14
%17 = load i32, i32* %8
%18 = load i32, i32* %5
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
%23 = load i32, i32* %6
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %20
store i32 1, i32* %3
br label %26
26: ; preds = %25, %20
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %16
30: ; preds = %16
%31 = load i32, i32* %3
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %37
35: ; preds = %30
%36 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %10
41: ; preds = %10
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [6 x i8] c"%i %i\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 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %19, %0
ret i32 0
13: ; preds = %0, %19
%14 = phi i32 [ %24, %19 ], [ 1, %0 ]
%15 = phi i32 [ %20, %19 ], [ 0, %0 ]
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 1
br i1 %18, label %19, label %27
19: ; preds = %27, %13
%20 = phi i32 [ %15, %13 ], [ %34, %27 ]
%21 = icmp eq i32 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%23 = call i32 @puts(i8* dereferenceable(1) %22)
%24 = add nuw nsw i32 %14, 1
%25 = load i32, i32* %1
%26 = icmp slt i32 %14, %25
br i1 %26, label %13, label %12
27: ; preds = %13, %27
%28 = phi i32 [ %35, %27 ], [ 1, %13 ]
%29 = phi i32 [ %34, %27 ], [ %15, %13 ]
%30 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%31 = load i32, i32* %2
%32 = load i32, i32* %4
%33 = icmp sgt i32 %31, %32
%34 = select i1 %33, i32 1, i32 %29
%35 = add nuw nsw i32 %28, 1
%36 = load i32, i32* %3
%37 = icmp slt i32 %28, %36
br i1 %37, label %27, label %19
}