A=map(int,input().split()) if A[0]A[4]: print("YES") else: print("NO")