#include<bits/stdc++.h>
using namespace std;
void rd(int &x){
  int k, m=0;
  x=0;
  for(;;){
    k = getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    putchar_unlocked(c[i]);
  }
}
int main(){
  int c1, c2, h1, h2;
  rd(c1);
  rd(c2);
  rd(h1);
  rd(h2);
  if(max(c1,c2) <= min(h1,h2)){
    wt_L("YES");
    putchar_unlocked('\n');
  }
  else{
    wt_L("NO");
    putchar_unlocked('\n');
  }
  return 0;
}
// cLay varsion 20170501-1 [beta]

// --- original code ---
// {
//   int c1, c2, h1, h2;
//   rd(c1,c2,h1,h2);
//   if(max(c1,c2) <= min(h1,h2)) wt("YES"); else wt("NO");
// }