#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 */
long long max(long long, long long);
long long min(long long, long long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long long *, ...);
int main(void) {
  long long int n, q, ar[100009], ma, mi, i, t;
  scanf("%lld%lld", &n, &q);
  scanf("%lld", &ar[0]);
  ma = ar[0];
  mi = ar[0];
  for (i = 1; i < n; i++) {
    scanf("%lld", &ar[i]);
    ma = max(ma, ar[i]);
    mi = min(mi, ar[i]);
  }
  while (q--) {
    scanf("%lld", &t);
    if (t >= mi && t <= ma)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc3580,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1060 <scanf@plt>
lea    -0xc3560(%rbp),%rsi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0xc3560(%rbp),%rax
mov    %rax,-0xc3568(%rbp)
mov    -0xc3560(%rbp),%rax
mov    %rax,-0xc3570(%rbp)
movq   $0x1,-0xc3578(%rbp)
mov    -0xc3578(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1233 <main+0xf3>
mov    -0xc3578(%rbp),%rax
lea    -0xc3560(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0xc3568(%rbp),%rdi
mov    -0xc3578(%rbp),%rax
mov    -0xc3560(%rbp,%rax,8),%rsi
ff
call   1050 <max@plt>
mov    %rax,-0xc3568(%rbp)
mov    -0xc3570(%rbp),%rdi
mov    -0xc3578(%rbp),%rax
mov    -0xc3560(%rbp,%rax,8),%rsi
ff
call   1040 <min@plt>
mov    %rax,-0xc3570(%rbp)
mov    -0xc3578(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc3578(%rbp)
jmp    11a4 <main+0x64>
jmp    1238 <main+0xf8>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     12b0 <main+0x170>
lea    0xdac(%rip),%rdi
lea    -0xc3580(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0xc3580(%rbp),%rax
cmp    -0xc3570(%rbp),%rax
jl     129f <main+0x15f>
mov    -0xc3580(%rbp),%rax
cmp    -0xc3568(%rbp),%rax
jg     129f <main+0x15f>
lea    0xd74(%rip),%rdi
call   1030 <printf@plt>
jmp    12ab <main+0x16b>
lea    0xd68(%rip),%rdi
call   1030 <printf@plt>
jmp    1238 <main+0xf8>
xor    %eax,%eax
add    $0xc3580,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc3568,%rsp
lea    0xea8(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe94(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x20(%rsp),%r14
cmpq   $0x2,0x10(%rsp)
jl     11eb <main+0xab>
mov    $0x1,%ebx
mov    $0x8,%r12d
lea    0xe69(%rip),%r15
mov    %r14,%r13
xchg   %ax,%ax
lea    (%rsp,%r12,1),%rsi
add    $0x20,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x20(%rsp,%rbx,8),%rsi
mov    %r13,%rdi
call   1050 <max@plt>
mov    %rax,%r13
mov    0x20(%rsp,%rbx,8),%rsi
mov    %r14,%rdi
call   1040 <min@plt>
mov    %rax,%r14
add    $0x1,%rbx
add    $0x8,%r12
cmp    0x10(%rsp),%rbx
jl     11a0 <main+0x60>
subq   $0x1,0x8(%rsp)
jae    11f6 <main+0xb6>
jmp    1240 <main+0x100>
mov    %r14,%r13
subq   $0x1,0x8(%rsp)
jb     1240 <main+0x100>
lea    0xe07(%rip),%r15
lea    0x18(%rsp),%r12
lea    0xe00(%rip),%rbx
lea    0xdfc(%rip),%rbp
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x18(%rsp),%rax
cmp    %r13,%rax
mov    %rbp,%rdi
cmovg  %rbx,%rdi
cmp    %r14,%rax
cmovl  %rbx,%rdi
call   1030 <puts@plt>
subq   $0x1,0x8(%rsp)
jae    1210 <main+0xd0>
xor    %eax,%eax
add    $0xc3568,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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