a,b,c,d=map(int,input().split()) print('YNEOS'[(a>=b or c<=d)::2])