1 #include <iostream>
2 #include <cstdio>
3 #include <cstring>
4 #include <cmath>
5 #include <algorithm>
6 #include <climits>
7 #include <vector>
8 #include <queue>
9 #include <cstdlib>
10 #include <string>
11 #include <set>
12 #include <stack>
13 #define LL long long
14 #define pii pair<int,int>
15 #define INF 0x3f3f3f3f
16 using namespace std;
17 const int maxn = 20;
18 int n,m,x,y;
19 bool vis[maxn][maxn];
20 int dp[maxn][maxn];
21 const int dir[8][2] = {2,1,1,2,-1,2,-2,1,-2,-1,-1,-2,1,-2,2,-1};
22 bool isIn(int x,int y){
23 return x <= n && x >= 0 && y <= m && y >= 0;
24 }
25 int main() {
26 while(~scanf("%d %d %d %d",&n,&m,&x,&y)){
27 memset(vis,false,sizeof(vis));
28 vis[x][y] = true;
29 for(int i = 0; i < 8; ++i){
30 int tx = x+dir[i][0];
31 int ty = y+dir[i][1];
32 if(isIn(tx,ty)) vis[tx][ty] = true;
33 }
34 memset(dp,0,sizeof(dp));
35 dp[0][0] = 1;
36 for(int i = 1; i <= m; ++i) {
37 if(vis[0][i]) continue;
38 dp[0][i] += dp[0][i-1];
39 }
40 for(int i = 1; i <= n; ++i){
41 if(vis[i][0]) continue;
42 dp[i][0] += dp[i-1][0];
43 }
44 for(int i = 1; i <= n; ++i){
45 for(int j = 1; j <= m; ++j){
46 if(vis[i][j]) continue;
47 dp[i][j] += dp[i-1][j] + dp[i][j-1];
48 }
49 }
50 cout<<dp[n][m]<<endl;
51 }
52 return 0;
53 }