import sys



n = int(eval(input()))

before_t, before_x, before_y = 0, 0, 0

for i in range(n):

	txy_strs = input().split()

	t, x, y = tuple(map(int, txy_strs))

	

	movable = t - before_t

	min_move = abs(x - before_x) + abs(y - before_y)



	remaining = movable - min_move

	if 0 <= remaining and remaining % 2 == 0:

		before_t, before_x, before_y = t, x, y

	else:

		print("No")

		sys.exit()

print("Yes")


import sys



n = int(sys.stdin.readline())

before_t, before_x, before_y = 0, 0, 0

for i in range(n):

	txy_strs = sys.stdin.readline().split()

	t, x, y = tuple(map(int, txy_strs))



	movable = t - before_t

	min_move = abs(x - before_x) + abs(y - before_y)



	remaining = movable - min_move

	if 0 <= remaining and remaining % 2 == 0:

		before_t, before_x, before_y = t, x, y

	else:

		print("No")

		sys.exit()

print("Yes")
import sys

n = int(eval(input()))
before_t, before_x, before_y = 0, 0, 0
for i in range(n):
    txy_strs = input().split()
    t, x, y = tuple(map(int, txy_strs))
    movable = t - before_t
    min_move = abs(x - before_x) + abs(y - before_y)
    remaining = movable - min_move
    if 0 <= remaining and remaining % 2 == 0:
        before_t, before_x, before_y = t, x, y
    else:
        print("No")
        sys.exit()
print("Yes")

import sys

n = int(sys.stdin.readline())
before_t, before_x, before_y = 0, 0, 0
for i in range(n):
    txy_strs = sys.stdin.readline().split()
    t, x, y = tuple(map(int, txy_strs))
    movable = t - before_t
    min_move = abs(x - before_x) + abs(y - before_y)
    remaining = movable - min_move
    if 0 <= remaining and remaining % 2 == 0:
        before_t, before_x, before_y = t, x, y
    else:
        print("No")
        sys.exit()
print("Yes")

-n = int(eval(input())) +n = int(sys.stdin.readline()) -    txy_strs = input().split() +    txy_strs = sys.stdin.readline().split()