PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000206. Chia hai hệ số tổ hợp (Choose and Divide)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Chia hai hệ số tổ hợp (Choose and Divide)

Choose and Divide

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

For nonnegative integers a,ba,b with b≤ab\le a, the binomial coefficient is

C(a,b)=a!b!(a−b)!,0!=1.C(a,b)=\frac{a!}{b!(a-b)!},\qquad 0!=1.

Given four nonnegative integers p,q,r,sp,q,r,s, calculate

R=C(p,q)C(r,s).R=\frac{C(p,q)}{C(r,s)}.

The binomial coefficients may be very large, although the required quotient does not exceed 10810^8. Print the quotient in decimal notation with exactly five digits after the decimal point.

Input

The only line contains four integers p,q,r,sp,q,r,s in that order.

Output

Print RR on one line, rounded to exactly 55 digits after the decimal point.

Subtasks

  • Subtask 1 (20 points): 0≤q≤p≤500\le q\le p\le 50; 0≤s≤r≤500\le s\le r\le 50; 0<R≤1080<R\le 10^8.
  • Subtask 2 (30 points): 0≤q≤p≤10000\le q\le p\le 1000; 0≤s≤r≤10000\le s\le r\le 1000; 0<R≤1080<R\le 10^8.
  • Subtask 3 (50 points): 0≤q≤p<1040\le q\le p<10^4; 0≤s≤r<1040\le s\le r<10^4; 0<R≤1080<R\le 10^8.

Examples

Input

10 5 14 9

Output

0.12587

Explanation

C(10,5)=252C(10,5)=252 and C(14,9)=2002C(14,9)=2002. Hence R=252/2002≈0.1258741259R=252/2002\approx0.1258741259, which rounds to 0.12587 with five decimal places.