import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    static String isSatisfiable(int c1, int c2, int h1, int h2){
       int mayor= c1>c2 ? c1 : c2;
        int menor= h1<h2 ? h1 : h2;
        if(mayor<=menor) return "YES";
        return "NO";
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // Return "YES" if all four conditions can be satisfied, and "NO" otherwise
        int c1 = in.nextInt();
        int c2 = in.nextInt();
        int h1 = in.nextInt();
        int h2 = in.nextInt();
        String result = isSatisfiable(c1, c2, h1, h2);
        System.out.println(result);
        
    }
}