#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).leftindex), &((*pts).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    1184 <main+0x54>
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x4,%rdx
lea    0xe8f(%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     11a8 <main+0x78>
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xae>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
jl     11cd <main+0x9d>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    11d9 <main+0xa9>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xae>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0x4(%rax),%r14
lea    0xeb3(%rip),%r15
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    (%rbx),%eax
cmp    0xc(%rbx),%eax
jle    118a <main+0x5a>
mov    0x8(%rbx),%eax
cmp    0x4(%rbx),%eax
lea    0xe8e(%rip),%rax
lea    0xe83(%rip),%rdi
cmovl  %rax,%rdi
jmp    1191 <main+0x61>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
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 = %15, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load %struct.point*, %struct.point** %3
%11 = getelementptr inbounds %struct.point, %struct.point* %10, i32 0, i32 0
%12 = load %struct.point*, %struct.point** %3
%13 = getelementptr inbounds %struct.point, %struct.point* %12, i32 0, i32 1
%14 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %11, i32* %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %6
18: ; preds = %6
%19 = load %struct.point*, %struct.point** %3
%20 = getelementptr inbounds %struct.point, %struct.point* %19, i64 0
%21 = getelementptr inbounds %struct.point, %struct.point* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load %struct.point*, %struct.point** %3
%24 = getelementptr inbounds %struct.point, %struct.point* %23, i64 1
%25 = getelementptr inbounds %struct.point, %struct.point* %24, i32 0, i32 1
%26 = load i32, i32* %25
%27 = icmp sle i32 %22, %26
br i1 %27, label %28, label %30
28: ; preds = %18
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %45
30: ; preds = %18
%31 = load %struct.point*, %struct.point** %3
%32 = getelementptr inbounds %struct.point, %struct.point* %31, i64 1
%33 = getelementptr inbounds %struct.point, %struct.point* %32, i32 0, i32 0
%34 = load i32, i32* %33
%35 = load %struct.point*, %struct.point** %3
%36 = getelementptr inbounds %struct.point, %struct.point* %35, i64 0
%37 = getelementptr inbounds %struct.point, %struct.point* %36, i32 0, i32 1
%38 = load i32, i32* %37
%39 = icmp sge i32 %34, %38
br i1 %39, label %40, label %42
40: ; preds = %30
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %44
42: ; preds = %30
%43 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %44
44: ; preds = %42, %40
br label %45
45: ; preds = %44, %28
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 = tail call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%7 = load i32, i32* %3
%8 = getelementptr inbounds %struct.point, %struct.point* %2, i64 1, i32 1
%9 = load i32, i32* %8
%10 = icmp sgt i32 %7, %9
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = getelementptr inbounds %struct.point, %struct.point* %2, i64 1, i32 0
%13 = load i32, i32* %12
%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 = %11, %0
%18 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %16, %11 ]
%19 = tail call i32 @printf(i8* dereferenceable(1) %18)
ret i32 0
}