a,b,c,d=map(int,input().split()) print('NYOE S'[ad::2])