x1,y1,x2,y2,x3=map(int,input().split()) print(["No","Yes"][y1==y2])