# -*- coding: utf-8 -*-



n = int(eval(input()))

t_bef, x_bef, y_bef, flag = 0, 0, 0, 0

travel = []

for i in range(n):

    travel.append([int(x) for x in input().split()])



for j in travel:

    t, x, y = j[0], j[1], j[2]

    check = (t - t_bef) - abs(x_bef - x) - abs(y_bef - y)

    t_bef, x_bef, y_bef = t, x, y

    if check < 0:

        print('No')

        flag = 1

        break

    if check % 2 != 0:

        print('No')

        flag = 1

        break

if flag == 0:

    print('Yes')
# -*- coding: utf-8 -*-



n = int(eval(input()))

t_bef, x_bef, y_bef, flag = 0, 0, 0, 0

travel = []

for i in range(n):

    t, x, y = [int(x) for x in input().split()]

    check = (t - t_bef) - abs(x_bef - x) - abs(y_bef - y)

    t_bef, x_bef, y_bef = t, x, y

    if check < 0:

        print('No')

        flag = 1

        break

    if check % 2 != 0:

        print('No')

        flag = 1

        break

if flag == 0:

    print('Yes')
# -*- coding: utf-8 -*-
n = int(eval(input()))
t_bef, x_bef, y_bef, flag = 0, 0, 0, 0
travel = []
for i in range(n):
    travel.append([int(x) for x in input().split()])
for j in travel:
    t, x, y = j[0], j[1], j[2]
    check = (t - t_bef) - abs(x_bef - x) - abs(y_bef - y)
    t_bef, x_bef, y_bef = t, x, y
    if check < 0:
        print("No")
        flag = 1
        break
    if check % 2 != 0:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")

# -*- coding: utf-8 -*-
n = int(eval(input()))
t_bef, x_bef, y_bef, flag = 0, 0, 0, 0
travel = []
for i in range(n):
    t, x, y = [int(x) for x in input().split()]
    check = (t - t_bef) - abs(x_bef - x) - abs(y_bef - y)
    t_bef, x_bef, y_bef = t, x, y
    if check < 0:
        print("No")
        flag = 1
        break
    if check % 2 != 0:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")

-    travel.append([int(x) for x in input().split()]) -for j in travel: -    t, x, y = j[0], j[1], j[2] +    t, x, y = [int(x) for x in input().split()]