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