/** * @FileName a.cpp * @Author kanpurin * @Created 2020.07.10 21:20:54 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int a, b, c, d;cin >> a >> b >> c >> d; if (a < b && c > d) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }