Problem:
Score : 400 points

Problem Statement

We have a large square grid with H rows and W columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.

However, she cannot enter the cells in the intersection of the bottom A rows and the leftmost B columns. (That is, there are A×B forbidden cells.) There is no restriction on entering the other cells.

Find the number of ways she can travel to the bottom-right cell.

Since this number can be extremely large, print the number modulo 10^9+7.

Constraints

1 ≦ H, W ≦ 100,000

1 ≦ A < H

1 ≦ B < W

Input

The input is given from Standard Input in the following format:

H W A B

Output

Print the number of ways she can travel to the bottom-right cell, modulo 10^9+7.

Sample Input 1

2 3 1 1

Sample Output 1

2

We have a 2×3 grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".

Sample Input 2

10 7 3 4

Sample Output 2

3570

There are 12 forbidden cells.

Sample Input 3

100000 100000 99999 99999

Sample Output 3

1

Sample Input 4

100000 100000 44444 55555

Sample Output 4

738162020

Solution in Java7 (OpenJDK 1.7.0) (judge verdict: Runtime Error)

//座標(H-W-1,B+1)を点Pとする

import java.util.*;

public class Main {
  static int H,W,A,B;
  static int Smaller = 1;
  static int modtotal,total,p,pxtotal,p1,p2,p3,p4;
  static int px,p1x,p2x,p3x,p4x;
  static int pxa,p1xa,p2xa,p3xa,p4xa;
  static int p1sum = 1;
  static int p2sum = 1;
  static int p3sum = 1;
  static int p4sum = 1;
  static int p1xasum = 1;
  static int p2xasum = 1;
  static int p1xbsum = 1;
  static int p2xbsum = 1;
  static int p3xsum = 1;
  static int p4xsum = 1;
  static int p1p2,p3p4,p1p2x,p1p2xa,p1p2xb,p3p4x;
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    H = sc.nextInt();
    W = sc.nextInt();
    A = sc.nextInt();
    B = sc.nextInt();
    for (int i=0; i<H; i++) {
      int p1 = (H-A+B-i);
        p1sum *= p1;
      int p2 = (B+1-i);
        p2sum *= p2;
    }
    for (int i=0; i<A+1; i++) {
      int p3 = (A+W-B-i);
        p3sum *= p3;
      int p4 = (A+1-i);
        p4sum *= p4;
    }
    p1p2 = p1sum / p2sum;
    p3p4 = p3sum / p4sum;
    p = p1p2 * p3p4; //点Pにおける組み合わせ
    
    for (int i=1; i<W-B; i++) {
      for (int j=0; j<H; j++) {
        int p1xa = (H-A+B+i-j);
        p1xasum *= p1xa;
        int p2xa = (B+1+i-j);
        p2xasum *= p2xa;
        int p1xb = (H-A+B+i-j-1);
        p1xbsum *= p1xb;
        int p2xb = (B+i-j);
        p2xbsum *= p2xb;
        int p3x = (A+W-B+i-j);
        p3xsum *= p3x;
        int p4x = (A+1+i-j);
        p4xsum *= p4x;
        }
      p1p2xa = p1xasum / p2xasum;
      p1p2xb = p1xbsum / p2xbsum;
      p1p2x = p1p2xa - p1p2xb;
      p3p4x = p3xsum / p4xsum;
      pxtotal += p1p2x * p3p4x;
    }
    total = p + pxtotal;
    modtotal = total % 1000000007;
    System.out.println(modtotal);
    
  }
}