#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*/ fscanf(int /*<<< orphan*/, char *, int *, int *, int *,
                          int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  int x1, v1, x2, v2;
  fscanf(stdin, "%d %d %d %d", &x1, &v1, &x2, &v2);
  if (v2 - v1 == 0) {
    printf("NO");
    return 0;
  }
  double n = (x1 - x2) / (v2 - v1);
  char *result = (n > 0 && (x1 - x2) % (v2 - v1) == 0) ? "YES" : "NO";
  printf("%s\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
lea    -0x14(%rbp),%r9
call   1040 <fscanf@plt>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    117d <main+0x5d>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11f9 <main+0xd9>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jbe    11c4 <main+0xa4>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%dl
lea    0xe3e(%rip),%rax
lea    0xe3a(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
call   1050 <fscanf@plt>
mov    0x8(%rsp),%ecx
sub    0x10(%rsp),%ecx
je     1193 <main+0x63>
mov    0x14(%rsp),%eax
sub    0xc(%rsp),%eax
cltd
idiv   %ecx
test   %edx,%edx
lea    0xe94(%rip),%rdi
lea    0xe8a(%rip),%rcx
cmovne %rcx,%rdi
test   %eax,%eax
cmovle %rcx,%rdi
call   1030 <puts@plt>
jmp    11a1 <main+0x71>
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [3 x i8] c"NO\00"
@.str.2 = [4 x i8] c"YES\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca i8*
store i32 0, i32* %1
%8 = load i32, i32* @stdin
%9 = call i32 @fscanf(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %42
16: ; preds = %0
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = sub nsw i32 %17, %18
%20 = load i32, i32* %5
%21 = load i32, i32* %3
%22 = sub nsw i32 %20, %21
%23 = sdiv i32 %19, %22
%24 = sitofp i32 %23 to double
store double %24, double* %6
%25 = load double, double* %6
%26 = fcmp ogt double %25, 0.000000e+00
br i1 %26, label %27, label %36
27: ; preds = %16
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = sub nsw i32 %28, %29
%31 = load i32, i32* %5
%32 = load i32, i32* %3
%33 = sub nsw i32 %31, %32
%34 = srem i32 %30, %33
%35 = icmp eq i32 %34, 0
br label %36
36: ; preds = %27, %16
%37 = phi i1 [ false, %16 ], [ %35, %27 ]
%38 = zext i1 %37 to i64
%39 = select i1 %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
store i8* %39, i8** %7
%40 = load i8*, i8** %7
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %40)
store i32 0, i32* %1
br label %42
42: ; preds = %36, %14
%43 = load i32, i32* %1
ret i32 %43
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [3 x i8] c"NO\00"
@.str.2 = [4 x i8] c"YES\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 = load i32, i32* @stdin
%10 = call i32 @fscanf(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = sub nsw i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %28
17: ; preds = %0
%18 = load i32, i32* %1
%19 = load i32, i32* %3
%20 = sub nsw i32 %18, %19
%21 = sdiv i32 %20, %13
%22 = srem i32 %20, %13
%23 = icmp sgt i32 %21, 0
%24 = icmp eq i32 %22, 0
%25 = select i1 %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%26 = select i1 %23, i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%27 = call i32 @puts(i8* dereferenceable(1) %26)
br label %28
28: ; preds = %17, %15
ret i32 0
}