#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 */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int i;
  struct point {
    int leftindex;
    int rightindex;
  };
  struct point *pts;
  pts = (struct point *)malloc(2 * sizeof(struct point));
  for (i = 0; i < 2; i++) {
    scanf("%d %d\n", &((pts[i]).leftindex), &((pts[i]).rightindex));
  }
  if ((pts[0]).leftindex <= (pts[1]).rightindex) {
    printf("YES");
  } else if ((pts[1]).leftindex >= (pts[0]).rightindex) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    119a <main+0x6a>
mov    -0x10(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
add    $0x4,%rdx
lea    0xe79(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x24>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0xc(%rcx),%eax
jg     11be <main+0x8e>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    11f4 <main+0xc4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
jl     11e3 <main+0xb3>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ef <main+0xbf>
lea    0xe21(%rip),%rdi
call   1030 <printf@plt>
jmp    11f4 <main+0xc4>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0x4(%rax),%r14
lea    0xeb0(%rip),%r12
mov    %r12,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
lea    0x8(%rbx),%r15
lea    0xc(%rbx),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    (%rbx),%eax
cmp    0xc(%rbx),%eax
jle    1192 <main+0x62>
mov    (%r15),%eax
cmp    (%r14),%eax
lea    0xe86(%rip),%rax
lea    0xe7b(%rip),%rdi
cmovl  %rax,%rdi
jmp    1199 <main+0x69>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.point = type { i32, i32 }
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 16)
%2 = inttoptr i64 %1 to %struct.point*
%3 = getelementptr inbounds %struct.point, %struct.point* %2, i64 0, i32 0
%4 = getelementptr inbounds %struct.point, %struct.point* %2, i64 0, i32 1
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%6 = getelementptr inbounds %struct.point, %struct.point* %2, i64 1, i32 0
%7 = getelementptr inbounds %struct.point, %struct.point* %2, i64 1, i32 1
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %7
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %0
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
%16 = select i1 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
br label %17
17: ; preds = %12, %0
%18 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %16, %12 ]
%19 = tail call i32 @printf(i8* dereferenceable(1) %18)
ret i32 0
}