#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// --------------------------------------------------------
template<class T> bool chmax(T& a, const T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T& a, const T b) { if (b < a) { a = b; return 1; } return 0; }
#define FOR(i,l,r) for (int i = (l); i < (r); ++i)
#define RFOR(i,l,r) for (int i = (r)-1; (l) <= i; --i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define MIN(c) *min_element(ALL(c))
#define MAX(c) *max_element(ALL(c))
#define SUM(c) accumulate(ALL(c), 0)
#define SUMLL(c) accumulate(ALL(c), 0LL)
#define SZ(c) ((int)(c).size())
#define CIN(c) cin >> (c)
#define COUT(c) cout << (c) << '\n'
#define debug(x) cerr << #x << " = " << (x) << '\n';
using P = pair<int,int>;
using VP = vector<P>;
using VVP = vector<VP>;
using VS = vector<string>;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<ll>;
using VVLL = vector<VLL>;
using VB = vector<bool>;
using VVB = vector<VB>;
using VD = vector<double>;
using VVD = vector<VD>;
static const double EPS = 1e-10;
static const double PI  = acos(-1.0);
static const ll MOD = 1000000007;
// static const ll MOD = 998244353;
static const int INF = (1 << 30) - 1;  // 1073741824 - 1
// static const ll INF = (1LL << 62) - 1;  // 4611686018427387904 - 1
// --------------------------------------------------------
// #include <atcoder/all>
// using namespace atcoder;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);

    ll r1, c1; cin >> r1 >> c1;
    ll r2, c2; cin >> r2 >> c2;

    ll dr = llabs(r1 - r2);
    ll dc = llabs(c1 - c2);
    if (r1 == r2 && c1 == c2) { COUT(0); return 0; }
    if (dr + dc <= 3) { COUT(1); return 0; }
    if (dr == dc) { COUT(1); return 0; }
    if (dr + dc <= 6) { COUT(2); return 0; }
    if (llabs(dr - dc) % 2 == 0) { COUT(2); return 0; }
    if (llabs(dr - dc) <= 3) { COUT(2); return 0; }
    COUT(3); return 0;

    return 0;
}

#include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
vector<ll> ans_vec(500,0);
ll H,W,A,B;

void dfs(ll a,ll k,ll board[]){
    if(k == A){
        ans_vec[a]++;
    }
    for(ll h=0;h<H;h++){
        for(ll w=0;w<W;w++){
            if(k < a){
                if(w == W-1)
                    continue;
                if(board[h*H+w] == 1 || board[h*H+w+1] == 1)
                    continue;
                ll copy_board[500];
                rep(i,500)
                    copy_board[i] = board[i];
                copy_board[h*H+w] = 1;
                copy_board[h*H+w+1] = 1;
                dfs(a,k+1,copy_board);
            }
            else{
                if(h == H-1)
                    continue;
                if(board[h*H+w] == 1 || board[h*H+w+H] == 1)
                    continue;
                ll copy_board[500];
                rep(i,500)
                    copy_board[i] = board[i];
                copy_board[h*H+w] = 1;
                copy_board[h*H+w+H] = 1;
                dfs(a,k+1,copy_board);
            }
        }
    }
}

ll frac(ll a){
    if(a == 0)
        return 1;
    else
        return a*frac(a-1);
}


int main(){
    ll ans = 0;
    cin >> H >> W >> A >> B;
    if(H < W){
        ll tmp = W;
        W = H;
        H = tmp;
    }

    //0...縦 1...横

    for(ll a = 0; a <= A; a++){
        ll board[500];
        memset(board,0,sizeof(board));
        dfs(a,0,board);
    }
    for(ll a = 0; a <= A;a++){
        ans += ans_vec[a]/(frac(a)*frac(A-a));
    }
    cout << ans << endl;
}


