h, w = map(int, input().split()) ni, nj = map(int, input().split()) zi, zj = map(int, input().split()) if h == 1 or w == 1: print("Yes") elif h == 2 or w == 2: print("Yes" if ((ni + nj) % 2) ^ ((zi + zj) % 2) else "No") else: print("No")