#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 C1, P1, C2, P2;
  scanf("%d%d%d%d", &C1, &P1, &C2, &P2);
  if (C1 * P1 == C2 * P2)
    printf("0\n");
  else if (C1 * P1 > C2 * P2)
    printf("-1\n");
  else
    printf("1\n");
  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    0xea1(%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    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    11a5 <main+0x85>
lea    0xe6d(%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    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
imul   0x14(%rsp),%eax
mov    0x8(%rsp),%ecx
imul   0xc(%rsp),%ecx
cmp    %ecx,%eax
lea    0xeaa(%rip),%rax
lea    0xea4(%rip),%rcx
cmovg  %rax,%rcx
lea    0xe9b(%rip),%rdi
cmovne %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [3 x i8] c"0\0A\00"
@.str.2 = [4 x i8] c"-1\0A\00"
@.str.3 = [3 x i8] c"1\0A\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 ([9 x i8], [9 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 ([3 x i8], [3 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 ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %28
26: ; preds = %16
%27 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 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 = [9 x i8] c"%d%d%d%d\00"
@str = [2 x i8] c"1\00"
@str.4 = [3 x i8] c"-1\00"
@str.5 = [2 x i8] c"0\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 ([9 x i8], [9 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
%17 = icmp sgt i32 %12, %15
%18 = select i1 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%19 = select i1 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0), i8* %18
%20 = call i32 @puts(i8* dereferenceable(1) %19)
ret i32 0
}