n = int(eval(input()))

t = 0

x = 0

y = 0

judge = True



for i in range(n):

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

    if (abs(x1 - x) + abs(y1 - y))/(t1 - t) > 1 or (abs(x1 - x) + abs(y1 - y))%2 != (t1 - t)%2:

        judge = False

    x = x1

    y = y1

    t = t1



if judge == True:

    print("Yes")

else:

    print("No")
import sys

input = sys.stdin.readline



n = int(eval(input()))

t = 0

x = 0

y = 0

judge = True



for i in range(n):

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

    if (abs(x1 - x) + abs(y1 - y))/(t1 - t) > 1 or (abs(x1 - x) + abs(y1 - y))%2 != (t1 - t)%2:

        judge = False

    x = x1

    y = y1

    t = t1



if judge == True:

    print("Yes")

else:

    print("No")
n = int(eval(input()))
t = 0
x = 0
y = 0
judge = True
for i in range(n):
    t1, x1, y1 = list(map(int, input().split()))
    if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1 or (
        abs(x1 - x) + abs(y1 - y)
    ) % 2 != (t1 - t) % 2:
        judge = False
    x = x1
    y = y1
    t = t1
if judge == True:
    print("Yes")
else:
    print("No")

import sys

input = sys.stdin.readline
n = int(eval(input()))
t = 0
x = 0
y = 0
judge = True
for i in range(n):
    t1, x1, y1 = list(map(int, input().split()))
    if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1 or (
        abs(x1 - x) + abs(y1 - y)
    ) % 2 != (t1 - t) % 2:
        judge = False
    x = x1
    y = y1
    t = t1
if judge == True:
    print("Yes")
else:
    print("No")

+import sys + +input = sys.stdin.readline