X1,Y1,X2,Y2,X3=map(int,input().split()) if abs(Y1)==abs(Y2): print("Yes") else: print("No")