def ip():return int(input()) def mp():return map(int, input().split()) def lmp():return list(map(int, input().split())) x1, y1, x2, y2, x3 = mp() if y1 == y2: print('Yes') else: print('No')