#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rrep(i,n) for(int i = (n-1);i>=0;--i)
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
const int INF=1<<30;
//const ll INF=1LL<<60;

int dpa[102];
int dpb[102];
 
int main() {

    int a,b,x,y;
    cin >> a >> b >> x >> y;

    dpa[1] = 0;
    dpb[1] = 0;
    repi(i,1,100) {
        dpa[i+1] = min(dpa[i]+y,dpb[i]+x);
        dpb[i+1] = min(dpa[i+1]+x,dpb[i]+y);
    }

    int ans = 0;
    if(a>b)   ans+=dpa[a]-dpb[b];
    if(b>a)   ans+=dpb[b]-dpa[a]+x;
    if(a == b)  ans+= x;

    cout<<ans<<endl;

    
 return 0;
}
#include <bits/stdc++.h>
using namespace std;
  
int main() {
  int H,W,N,M;
  cin >> H >> W >> N >> M;
  
  vector<vector<int>> data(H, vector<int>(W,0));
  vector<int>x(N);
  vector<int>y(N);
  for (int i = 0; i < N; i++) {
    cin >> x.at(i);
    cin >> y.at(i);
  }
  vector<int>X(M);
  vector<int>Y(M);
  for (int i = 0; i < M; i++) {
    cin >> X.at(i);
    cin >> Y.at(i);
  }
  
  for (int i = 0; i < M; i++) {
    data.at(X.at(i)-1).at(Y.at(i)-1) = -1;
  }
  for (int i = 0; i < N; i++) {
    data.at(x.at(i)-1).at(y.at(i)-1) = 1;
  }
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (data.at(i).at(j) == 0){
        for (int k = i+1; k < H; k++) {
          if (data.at(k).at(j) == -1){
            break;
          }
          else if (data.at(k).at(j) == 1){
            data.at(i).at(j) = 10;
            break;
          }
        }
        for (int k = i-1; k >= 0; k--) {
          if (data.at(k).at(j) == -1){
            break;
          }
          else if (data.at(k).at(j) == 1){
            data.at(i).at(j) = 10;
            break;
          }
        }
        for (int k = j+1; k < W; k++) {
          if (data.at(i).at(k) == -1){
            break;
          }
          else if (data.at(i).at(k) == 1){
            data.at(i).at(j) = 10;
            break;
          }
        }
        for (int k = j-1; k >= 0; k--) {
          if (data.at(i).at(k) == -1){
            break;
          }
          else if (data.at(i).at(k) == 1){
            data.at(i).at(j) = 10;
            break;
          }
        }
      }
    }
  }
 
  int count = 0;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (data.at(i).at(j) > 0) {
        count++;
      }
    }
  }
  cout << count << endl;
       
}
    
      
    
    