n = int(eval(input()))

ans = "Yes"

t,x,y = 0,0,0

for i in range(n):

    t1,x1,y1 = list(map(int,input().split()))

    td,dis = t1-t,x1+y1-x-y

    if td%2 != dis%2 or td < dis:

        ans = "No"

        break

    t,x,y = t1,x1,y1

print(ans)
from sys import stdin



input = stdin.readline

lines = stdin.readlines



n = int(eval(input()))



txy = ((list(map(int, line.split()))) for line in lines())

ans = "Yes"

t,x,y = 0,0,0



for t1,x1,y1 in txy:

    

    td,dis = t1-t,abs(x1-x)+abs(y1-y)

    if td%2 != dis%2 or td < dis:

        ans = "No"

        break

    t,x,y = t1,x1,y1

print(ans)
n = int(eval(input()))
ans = "Yes"
t, x, y = 0, 0, 0
for i in range(n):
    t1, x1, y1 = list(map(int, input().split()))
    td, dis = t1 - t, x1 + y1 - x - y
    if td % 2 != dis % 2 or td < dis:
        ans = "No"
        break
    t, x, y = t1, x1, y1
print(ans)

from sys import stdin

input = stdin.readline
lines = stdin.readlines
n = int(eval(input()))
txy = ((list(map(int, line.split()))) for line in lines())
ans = "Yes"
t, x, y = 0, 0, 0
for t1, x1, y1 in txy:
    td, dis = t1 - t, abs(x1 - x) + abs(y1 - y)
    if td % 2 != dis % 2 or td < dis:
        ans = "No"
        break
    t, x, y = t1, x1, y1
print(ans)

+from sys import stdin + +input = stdin.readline +lines = stdin.readlines +txy = ((list(map(int, line.split()))) for line in lines()) -for i in range(n): -    t1, x1, y1 = list(map(int, input().split())) -    td, dis = t1 - t, x1 + y1 - x - y +for t1, x1, y1 in txy: +    td, dis = t1 - t, abs(x1 - x) + abs(y1 - y)