#include<algorithm> // min, max, sort,
#include<iostream>
#include<iomanip>   // fixed+setprecision,
#include<cstdint>   // int64_t,
#include<vector>
#include<map>

using namespace std;

const static int64_t MOD = 1000000007;

int main()
{
    int64_t a, b, c, d;

    cin>>a>>b;
    cin>>c>>d;

    cout<<b-c<<endl;

    return 0;
}
#include <iostream>
using namespace std;

int main(){
    int N, S, D;
    cin >> N >> S >> D;

    int *spell_time = new int[N];
    int *spell_damage = new int[N];
    for(int i = 0; i < N; i++){
        cin >> spell_time[i] >> spell_damage[i];
    }

    bool result = false;

    for(int i = 0; i < N; i++){
        if((spell_time[i] < S) && (spell_damage[i] > D)){
            result = true;
            break;
        }
    }

    cout << (result ? "Yes" : "No") << endl;

}