#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i < (n); i++)
using ll = long long;
using P = pair<int,int>;

int main(){
    int a,b,x,y;
    int ans;
    cin >> a >> b >> x >> y;
    int less = x;
    if(x > y) less = y;
    int trueless = y;
    if(2*x < y) trueless = 2*x;
    int lastless = x+y;
    if(3*x < x+y) lastless = 3*x;
    if(a < b){
        int du = b-a;
        if(2*x < y){
            ans = (du-1)*trueless + lastless;
        }else{
            ans = x + du*y;
        }
    }else if(a > b){
        int du = a-b;
        if(2*x < y){
            if(x < y){
                ans = (du-1)*trueless+x;
            }else{
                ans = (du-1)*trueless-x+y;
            }
        }else{
            ans = x + (du-1)*y;
        }
    }else if(a == b){
        ans = x;
    }
    cout << ans << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  int total=a+b+c+d;
  if(total%2==1){
    cout<<"No";
  }
  else{
    total=total/2;
    if(a+b==total || a+c==total || a+d==total ||a+b+c==total ||a+b+d==total ||a+c+d==total){
      cout<<"Yes";
    }
    else{
      cout<<"No";
    }
  }
}
