#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int n, k, i, j;
  int a[1024];
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; ++i)
    scanf("%d", &a[i]);
  for (i = 0; i < n - 1; ++i)
    for (j = i + 1; j < n; ++j)
      if (a[i] + a[j] == k) {
        puts("yes");
        return 0;
      }
  puts("no");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1189 <main+0x69>
movslq -0x10(%rbp),%rax
lea    -0x1020(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114f <main+0x2f>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1213 <main+0xf3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1200 <main+0xe0>
movslq -0x10(%rbp),%rax
mov    -0x1020(%rbp,%rax,4),%eax
movslq -0x14(%rbp),%rcx
add    -0x1020(%rbp,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jne    11ed <main+0xcd>
lea    0xe29(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1226 <main+0x106>
jmp    11f2 <main+0xd2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11aa <main+0x8a>
jmp    1205 <main+0xe5>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1190 <main+0x70>
lea    0xdef(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1018,%rsp
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xebc(%rip),%r14
cmpl   $0x0,0x8(%rsp)
jle    1207 <main+0xe7>
lea    0x10(%rsp),%r12
lea    0xe9e(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1170 <main+0x50>
mov    %eax,%r10d
cmp    $0x2,%r10d
jl     1207 <main+0xe7>
lea    -0x1(%r10),%r9d
mov    0xc(%rsp),%edx
lea    0x10(%rsp),%rsi
xor    %r11d,%r11d
lea    0xe56(%rip),%r8
mov    %r10,%rax
jmp    11cd <main+0xad>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x4,%rsi
add    $0xffffffffffffffff,%rax
cmp    %r9,%r11
je     1207 <main+0xe7>
mov    %r11,%rcx
add    $0x1,%r11
cmp    %r10,%r11
jae    11c0 <main+0xa0>
mov    0x10(%rsp,%rcx,4),%ecx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rsi,%rbx,4),%edi
add    %ecx,%edi
cmp    %edx,%edi
je     1204 <main+0xe4>
add    $0x1,%rbx
cmp    %rbx,%rax
jne    11f0 <main+0xd0>
jmp    11c0 <main+0xa0>
mov    %r8,%r14
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x1018,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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