Under construction

Still being built. Things may change

Choose and Divide

Time limit1sMemory limit128 MB

Summary
For each line, compute the binomial coefficient C(p,q) divided by C(r,s) and print the quotient to five decimal places.
Level

Medium6 of 10

Topics
Math, Number theory, Implementation
Solved
No attempts yet

Problem

The binomial coefficient C(m,n)C(m, n) is defined as

C(m,n)=m!n! (m−n)!C(m, n) = \frac{m!}{n!\,(m-n)!}

Given four natural numbers pp, qq, rr, and ss, compute the value of C(p,q)C(p, q) divided by C(r,s)C(r, s).

Input

The input consists of a sequence of lines. Each line contains four non-negative integers pp, qq, rr, and ss, in this order, separated by single spaces. Every integer is smaller than 10,00010{,}000, and it is guaranteed that p≥qp \ge q and r≥sr \ge s. Read until the end of input.

Output

For each input line, print the value of C(p,q)/C(r,s)C(p, q) / C(r, s) on its own line, rounded to exactly 55 digits after the decimal point (round half up). You may assume the result is never greater than 100,000,000100{,}000{,}000.

Examples2

  1. Example 1

    Input
    10 5 14 9
    93 45 84 59
    145 95 143 92
    995 487 996 488
    2000 1000 1999 999
    9998 4999 9996 4998
    
    Expected output
    0.12587
    505606.46055
    1.28223
    0.48996
    2.00000
    3.99960
    
  2. Example 2

    Input
    4 2 4 2
    5 0 5 0
    10 10 10 10
    
    Expected output
    1.00000
    1.00000
    1.00000