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