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