#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 */
double binomial(int, int);
double pow(double, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *);
void test_case() {
  int r, s, x, y, w;
  scanf("%d %d %d %d %d", &r, &s, &x, &y, &w);
  double above_or_eq = (s - r + 1.0) / s, below = (1 - above_or_eq), p_win = 0,
         p_lose = 0;
  for (int i = x; i <= y; i++)
    p_win += binomial(y, i) * pow(above_or_eq, i) * pow(below, y - i);
  p_lose = 1 - p_win;
  printf(p_win * (w - 1) + p_lose * (-1) > 0 ? "yes\n" : "no\n");
}


x86 assembly (clang, -O0):
<test_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
lea    -0x14(%rbp),%r9
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe86(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe6c(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1226 <test_case+0xe6>
mov    -0x10(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1030 <binomial@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x3c(%rbp),%edi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%edi
sub    -0x3c(%rbp),%edi
call   1060 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11b4 <test_case+0x74>
movsd  0xdd2(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
movsd  0xdb9(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
lea    0xdbe(%rip),%rdi
lea    0xdb2(%rip),%rax
ucomisd %xmm1,%xmm0
cmova  %rax,%rdi
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
lea    0xec3(%rip),%rdi
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x4(%rsp),%r8
lea    0x10(%rsp),%r9
call   1050 <scanf@plt>
mov    0x14(%rsp),%ebx
mov    0x4(%rsp),%edi
xorpd  %xmm2,%xmm2
cmp    %edi,%ebx
jg     121d <test_case+0xdd>
mov    0x18(%rsp),%eax
cvtsi2sd %eax,%xmm0
sub    0x1c(%rsp),%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  0xe66(%rip),%xmm1
addsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rsp)
subsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
mov    %ebx,%ebp
neg    %ebp
xorpd  %xmm2,%xmm2
nopw   0x0(%rax,%rax,1)
movsd  %xmm2,0x30(%rsp)
mov    %ebx,%esi
call   1030 <binomial@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
mov    %ebx,%edi
call   1060 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x4(%rsp),%edi
add    %ebp,%edi
movsd  0x20(%rsp),%xmm0
call   1060 <pow@plt>
movsd  0x30(%rsp),%xmm2
mulsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm2
lea    0x1(%rbx),%eax
mov    0x4(%rsp),%edi
add    $0xffffffff,%ebp
cmp    %edi,%ebx
mov    %eax,%ebx
jl     11c0 <test_case+0x80>
movsd  0xddb(%rip),%xmm1
subsd  %xmm2,%xmm1
mov    0x10(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
ucomisd 0xdc1(%rip),%xmm0
lea    0xdd1(%rip),%rax
lea    0xdcf(%rip),%rdi
cmova  %rax,%rdi
call   1040 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define void @test_case() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to double
%16 = fadd double %15, 1.000000e+00
%17 = load i32, i32* %2
%18 = sitofp i32 %17 to double
%19 = fdiv double %16, %18
store double %19, double* %6
%20 = load double, double* %6
%21 = fsub double 1.000000e+00, %20
store double %21, double* %7
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
%22 = load i32, i32* %3
store i32 %22, i32* %10
br label %23
23: ; preds = %42, %0
%24 = load i32, i32* %10
%25 = load i32, i32* %4
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %45
27: ; preds = %23
%28 = load i32, i32* %4
%29 = load i32, i32* %10
%30 = call double @binomial(i32 %28, i32 %29)
%31 = load double, double* %6
%32 = load i32, i32* %10
%33 = call double @pow(double %31, i32 %32)
%34 = fmul double %30, %33
%35 = load double, double* %7
%36 = load i32, i32* %4
%37 = load i32, i32* %10
%38 = sub nsw i32 %36, %37
%39 = call double @pow(double %35, i32 %38)
%40 = load double, double* %8
%41 = call double @llvm.fmuladd.f64(double %34, double %39, double %40)
store double %41, double* %8
br label %42
42: ; preds = %27
%43 = load i32, i32* %10
%44 = add nsw i32 %43, 1
store i32 %44, i32* %10
br label %23
45: ; preds = %23
%46 = load double, double* %8
%47 = fsub double 1.000000e+00, %46
store double %47, double* %9
%48 = load double, double* %8
%49 = load i32, i32* %5
%50 = sub nsw i32 %49, 1
%51 = sitofp i32 %50 to double
%52 = load double, double* %9
%53 = fmul double %52, -1.000000e+00
%54 = call double @llvm.fmuladd.f64(double %48, double %51, double %53)
%55 = fcmp ogt double %54, 0.000000e+00
%56 = zext i1 %55 to i64
%57 = select i1 %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%58 = call i32 @printf(i8* %57)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define void @test_case() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to double
%16 = fadd double %15, 1.000000e+00
%17 = sitofp i32 %12 to double
%18 = fdiv double %16, %17
%19 = fsub double 1.000000e+00, %18
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = icmp sgt i32 %20, %21
br i1 %22, label %23, label %34
23: ; preds = %34, %0
%24 = phi double [ 0.000000e+00, %0 ], [ %44, %34 ]
%25 = fsub double 1.000000e+00, %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, -1
%28 = sitofp i32 %27 to double
%29 = fneg double %25
%30 = call double @llvm.fmuladd.f64(double %24, double %28, double %29)
%31 = fcmp ogt double %30, 0.000000e+00
%32 = select i1 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%33 = call i32 @printf(i8* dereferenceable(1) %32)
ret void
34: ; preds = %0, %34
%35 = phi i32 [ %46, %34 ], [ %21, %0 ]
%36 = phi i32 [ %45, %34 ], [ %20, %0 ]
%37 = phi double [ %44, %34 ], [ 0.000000e+00, %0 ]
%38 = call double @binomial(i32 %35, i32 %36)
%39 = call double @pow(double %18, i32 %36)
%40 = fmul double %38, %39
%41 = load i32, i32* %4
%42 = sub nsw i32 %41, %36
%43 = call double @pow(double %19, i32 %42)
%44 = call double @llvm.fmuladd.f64(double %40, double %43, double %37)
%45 = add nsw i32 %36, 1
%46 = load i32, i32* %4
%47 = icmp slt i32 %36, %46
br i1 %47, label %34, label %23
}