#t300. 过河卒(knight)

过河卒(knight)

The Pawn and the Horse

Problem Background

Special for beginners, ^_^

Problem Description

On a chessboard there is a pawn at point A that needs to reach the target point B. The pawn moves only downwards or to the right. At the same time, there is an opponent's horse on the board at some point C. The point where the horse stands and all the points it can reach in one jump are called the horse's control points — such as point C and P1, …, P8 in the figure below — and the pawn may not pass through any of the horse's control points. The board is described using coordinates: point A is (0, 0), point B is (n, m) (n, m ≤ 20), and the coordinates of the horse are also given. C ≠ A and C ≠ B. Now you are asked to compute the number of paths by which the pawn can travel from A to B. Assume the horse stays fixed in place — it does not move one step each time the pawn moves.

knight

Input Format

One line with four values, representing the coordinates of point B and the coordinates of the horse, respectively.

Output Format

One value: the total number of paths.

Sample Input

6 6 3 3

Sample Output

6

Constraints

1s, 1024KiB for each test case.