N = int(eval(input()))

pnt = [[0]*3]

for i in range(N):

  pnt.append(list(map(int, input().split())))

cnt = 0

for i in range(1, N+1):

  t = pnt[i][0] - pnt[i-1][0]

  x = abs(pnt[i][1] - pnt[i-1][1])

  y = abs(pnt[i][2] - pnt[i-1][2])

  if t >= x+y and (t-(x+y)) % 2 == 0:

    cnt += 1

if cnt == N: print("Yes")

else: print("No")

n = int(eval(input()))

ti_1, xi_1, yi_1 = [0,0,0]

for i in range(n):

  ti, xi, yi = list(map(int, input().split()))

  tlim = ti- ti_1

  dist = abs(xi - xi_1) + abs(yi - yi_1)

  if tlim < dist or (tlim-dist) % 2 == 1:

    print('No')

    exit()

  else:

    ti_1, xi_1, yi_1 = ti, xi, yi

    continue

print('Yes')
N = int(eval(input()))
pnt = [[0] * 3]
for i in range(N):
    pnt.append(list(map(int, input().split())))
cnt = 0
for i in range(1, N + 1):
    t = pnt[i][0] - pnt[i - 1][0]
    x = abs(pnt[i][1] - pnt[i - 1][1])
    y = abs(pnt[i][2] - pnt[i - 1][2])
    if t >= x + y and (t - (x + y)) % 2 == 0:
        cnt += 1
if cnt == N:
    print("Yes")
else:
    print("No")

n = int(eval(input()))
ti_1, xi_1, yi_1 = [0, 0, 0]
for i in range(n):
    ti, xi, yi = list(map(int, input().split()))
    tlim = ti - ti_1
    dist = abs(xi - xi_1) + abs(yi - yi_1)
    if tlim < dist or (tlim - dist) % 2 == 1:
        print("No")
        exit()
    else:
        ti_1, xi_1, yi_1 = ti, xi, yi
        continue
print("Yes")

-N = int(eval(input())) -pnt = [[0] * 3] -for i in range(N): -    pnt.append(list(map(int, input().split()))) -cnt = 0 -for i in range(1, N + 1): -    t = pnt[i][0] - pnt[i - 1][0] -    x = abs(pnt[i][1] - pnt[i - 1][1]) -    y = abs(pnt[i][2] - pnt[i - 1][2]) -    if t >= x + y and (t - (x + y)) % 2 == 0: -        cnt += 1 -if cnt == N: -    print("Yes") -else: -    print("No") +n = int(eval(input())) +ti_1, xi_1, yi_1 = [0, 0, 0] +for i in range(n): +    ti, xi, yi = list(map(int, input().split())) +    tlim = ti - ti_1 +    dist = abs(xi - xi_1) + abs(yi - yi_1) +    if tlim < dist or (tlim - dist) % 2 == 1: +        print("No") +        exit() +    else: +        ti_1, xi_1, yi_1 = ti, xi, yi +        continue +print("Yes")