def dif(two_lists):

    return [abs(two_lists[1][i] - two_lists[0][i]) for i in range(3)]





n = int(eval(input()))



txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(n)]

dtxy = list(map(dif, list(zip(txy, txy[1:]))))



for i in range(n):

    dt, dx, dy = dtxy[i]

    if  dx + dy > dt or (dt - dx - dy) % 2:

        print("No")

        exit()

print("Yes")

import sys

def dif(two_lists):

    return [abs(two_lists[1][i] - two_lists[0][i]) for i in range(3)]





n = int(eval(input()))



txy = [[0, 0, 0]] + [[int(s) for s in line.split()] for line in sys.stdin]

dtxy = list(map(dif, list(zip(txy, txy[1:]))))



for i in range(n):

    dt, dx, dy = dtxy[i]

    if  dx + dy > dt or (dt - dx - dy) % 2:

        print("No")

        exit()

print("Yes")

def dif(two_lists):
    return [abs(two_lists[1][i] - two_lists[0][i]) for i in range(3)]


n = int(eval(input()))
txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(n)]
dtxy = list(map(dif, list(zip(txy, txy[1:]))))
for i in range(n):
    dt, dx, dy = dtxy[i]
    if dx + dy > dt or (dt - dx - dy) % 2:
        print("No")
        exit()
print("Yes")

import sys


def dif(two_lists):
    return [abs(two_lists[1][i] - two_lists[0][i]) for i in range(3)]


n = int(eval(input()))
txy = [[0, 0, 0]] + [[int(s) for s in line.split()] for line in sys.stdin]
dtxy = list(map(dif, list(zip(txy, txy[1:]))))
for i in range(n):
    dt, dx, dy = dtxy[i]
    if dx + dy > dt or (dt - dx - dy) % 2:
        print("No")
        exit()
print("Yes")

+import sys + + -txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(n)] +txy = [[0, 0, 0]] + [[int(s) for s in line.split()] for line in sys.stdin]