#include <bits/stdc++.h>

using namespace std;

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

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;
}