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