*a,=map(int,input().split()) if a[0]a[3]: print('YES') else: print('NO')