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

n = int(eval(input()))

txy = []

for i in range(n):

    txy.append([int(i) for i in input().split()])



ans = "Yes"

tmp_x = 0

tmp_y = 0

tmp_t = 0

for i in range(n):

    #print((abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])))

    if (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) % 2 != (txy[i][0] - tmp_t) % 2 or (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) > txy[i][0] - tmp_t:

        ans = "No"

    tmp_x = txy[i][1]

    tmp_y = txy[i][2]

    tmp_t = txy[i][0]

print(ans)

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

n = int(eval(input()))

txy = []

for i in range(n):

    txy.append([int(i) for i in input().split()])



ans = "Yes"

bx = 0

by = 0

bt = 0

for i in range(n):

    tmp = ((txy[i][1] - bx) + (txy[i][2] - by))

    if tmp % 2 != (txy[i][0] - bt) % 2 or tmp > (txy[i][0] - bt):

        ans = "No"

    bx = txy[i][1]

    by = txy[i][2]

    bt = txy[i][0]

print(ans)

# -*- coding: utf-8 -*-
n = int(eval(input()))
txy = []
for i in range(n):
    txy.append([int(i) for i in input().split()])
ans = "Yes"
tmp_x = 0
tmp_y = 0
tmp_t = 0
for i in range(n):
    # print((abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])))
    if (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) % 2 != (
        txy[i][0] - tmp_t
    ) % 2 or (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) > txy[i][0] - tmp_t:
        ans = "No"
    tmp_x = txy[i][1]
    tmp_y = txy[i][2]
    tmp_t = txy[i][0]
print(ans)

# -*- coding: utf-8 -*-
n = int(eval(input()))
txy = []
for i in range(n):
    txy.append([int(i) for i in input().split()])
ans = "Yes"
bx = 0
by = 0
bt = 0
for i in range(n):
    tmp = (txy[i][1] - bx) + (txy[i][2] - by)
    if tmp % 2 != (txy[i][0] - bt) % 2 or tmp > (txy[i][0] - bt):
        ans = "No"
    bx = txy[i][1]
    by = txy[i][2]
    bt = txy[i][0]
print(ans)

-tmp_x = 0 -tmp_y = 0 -tmp_t = 0 +bx = 0 +by = 0 +bt = 0 -    # print((abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2]))) -    if (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) % 2 != ( -        txy[i][0] - tmp_t -    ) % 2 or (abs(tmp_x - txy[i][1]) + abs(tmp_y - txy[i][2])) > txy[i][0] - tmp_t: +    tmp = (txy[i][1] - bx) + (txy[i][2] - by) +    if tmp % 2 != (txy[i][0] - bt) % 2 or tmp > (txy[i][0] - bt): -    tmp_x = txy[i][1] -    tmp_y = txy[i][2] -    tmp_t = txy[i][0] +    bx = txy[i][1] +    by = txy[i][2] +    bt = txy[i][0]