#include using namespace std; using ll = long long; template using vec = vector; template using vvec = vector>; int main(){ cin.tie(0); ios::sync_with_stdio(false); vec A(4); cin >> A[0] >> A[1] >> A[2] >> A[3]; cout << ((A[0]A[3])? "YES\n":"NO\n"); }