#include <bits/stdc++.h>

using namespace std;

string isSatisfiable(int c1, int c2, int h1, int h2){
    // Complete this function
    if (max(c1, c2) <= min(h1, h2)) {
        return "YES";
    } else {
        return "NO";
    }
}

int main() {
    // Return "YES" if all four conditions can be satisfied, and "NO" otherwise
    int c1;
    int c2;
    int h1;
    int h2;
    cin >> c1 >> c2 >> h1 >> h2;
    string result = isSatisfiable(c1, c2, h1, h2);
    cout << result << endl;
    return 0;
}