#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int P1, C1, P2, C2;
  scanf(" %d %d %d %d", &P1, &C1, &P2, &C2);
  if ((P1 * C1) == (P2 * C2))
    printf("0");
  else if ((P1 * C1) > (P2 * C2))
    printf("-1");
  else
    printf("1");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cmp    %ecx,%eax
jne    1172 <main+0x52>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cmp    %ecx,%eax
jle    1199 <main+0x79>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11a5 <main+0x85>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1050 <scanf@plt>
mov    0x10(%rsp),%eax
imul   0x14(%rsp),%eax
mov    0x8(%rsp),%ecx
imul   0xc(%rsp),%ecx
cmp    %ecx,%eax
jne    1171 <main+0x41>
mov    $0x30,%edi
jmp    1186 <main+0x56>
jle    1181 <main+0x51>
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
jmp    118b <main+0x5b>
mov    $0x31,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c" %d %d %d %d\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [3 x i8] c"-1\00"
@.str.3 = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
%13 = icmp eq i32 %9, %12
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %29
16: ; preds = %0
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = mul nsw i32 %20, %21
%23 = icmp sgt i32 %19, %22
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %28
26: ; preds = %16
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c" %d %d %d %d\00"
@.str.2 = [3 x i8] c"-1\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 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, %10
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %14, %13
%16 = icmp eq i32 %12, %15
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @putchar(i32 48)
br label %25
19: ; preds = %0
%20 = icmp sgt i32 %12, %15
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %25
23: ; preds = %19
%24 = call i32 @putchar(i32 49)
br label %25
25: ; preds = %21, %23, %17
ret i32 0
}