n=int(input())

txy=[]

for _ in range(n):

    t,x,y=map(int, input().split())

    txy.append((t,x,y))



def isOk(txy):

    now_pos=0

    now_t=0



    for t,x,y in txy:

        move=x+y-now_pos

        time=t-now_t

        if time>=move and time%2==move%2:

            continue

        else:

            return False

    return True



print("Yes") if isOk(txy) else print("No")

import sys

input = sys.stdin.buffer.readline

sys.setrecursionlimit(10 ** 7)



N = int(eval(input()))

TXY = [list(map(int, input().split())) for _ in range(N)]



nx, ny = 0, 0

time = 0



ans = "Yes"

for i in range(N):

    t, x, y = TXY[i]

    dt = t - time

    move = abs(nx - x) + abs(ny - y)

    if move > dt:

        ans = "No"

        break

    if dt % 2 != move % 2:

        ans = "No"

        break

    time, nx, ny = t, x, y



print(ans)

n = int(input())
txy = []
for _ in range(n):
    t, x, y = map(int, input().split())
    txy.append((t, x, y))


def isOk(txy):
    now_pos = 0
    now_t = 0
    for t, x, y in txy:
        move = x + y - now_pos
        time = t - now_t
        if time >= move and time % 2 == move % 2:
            continue
        else:
            return False
    return True


print("Yes") if isOk(txy) else print("No")

import sys

input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
N = int(eval(input()))
TXY = [list(map(int, input().split())) for _ in range(N)]
nx, ny = 0, 0
time = 0
ans = "Yes"
for i in range(N):
    t, x, y = TXY[i]
    dt = t - time
    move = abs(nx - x) + abs(ny - y)
    if move > dt:
        ans = "No"
        break
    if dt % 2 != move % 2:
        ans = "No"
        break
    time, nx, ny = t, x, y
print(ans)

-n = int(input()) -txy = [] -for _ in range(n): -    t, x, y = map(int, input().split()) -    txy.append((t, x, y)) +import sys - -def isOk(txy): -    now_pos = 0 -    now_t = 0 -    for t, x, y in txy: -        move = x + y - now_pos -        time = t - now_t -        if time >= move and time % 2 == move % 2: -            continue -        else: -            return False -    return True - - -print("Yes") if isOk(txy) else print("No") +input = sys.stdin.buffer.readline +sys.setrecursionlimit(10**7) +N = int(eval(input())) +TXY = [list(map(int, input().split())) for _ in range(N)] +nx, ny = 0, 0 +time = 0 +ans = "Yes" +for i in range(N): +    t, x, y = TXY[i] +    dt = t - time +    move = abs(nx - x) + abs(ny - y) +    if move > dt: +        ans = "No" +        break +    if dt % 2 != move % 2: +        ans = "No" +        break +    time, nx, ny = t, x, y +print(ans)