H, W = map(int, input().split()) sh, sw = map(int, input().split()) th, tw = map(int, input().split()) if H == 1 or W == 1: print("Yes") elif (abs(sh-th) + abs(sw-tw)) % 2 == 0: print("No") else: print("Yes")