n = int(eval(input()))

t,x,y =(0, 0, 0)

for _ in range(n):

    nt, nx, ny =list(map(int,input().split()))

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

    tim = nt - t

    if tim >= dis and (tim - dis) % 2 ==0:

        t,x,y=nt, nx, ny

    else:

        print('No')

        break

else:

    print('Yes')

from sys import stdin

 

input = stdin.readline

lines = stdin.readlines

 

N = int(eval(input()))

 

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

t,x,y =(0, 0, 0)

for nt, nx, ny in txy:

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

    tim = nt - t

    if tim >= dis and (tim - dis) % 2 ==0:

        t,x,y=nt, nx, ny

    else:

        print('No')

        break

else:

    print('Yes')
n = int(eval(input()))
t, x, y = (0, 0, 0)
for _ in range(n):
    nt, nx, ny = list(map(int, input().split()))
    dis = abs(nx - x) + abs(ny - y)
    tim = nt - t
    if tim >= dis and (tim - dis) % 2 == 0:
        t, x, y = nt, nx, ny
    else:
        print("No")
        break
else:
    print("Yes")

from sys import stdin

input = stdin.readline
lines = stdin.readlines
N = int(eval(input()))
txy = ((list(map(int, line.split()))) for line in lines())
t, x, y = (0, 0, 0)
for nt, nx, ny in txy:
    dis = abs(nx - x) + abs(ny - y)
    tim = nt - t
    if tim >= dis and (tim - dis) % 2 == 0:
        t, x, y = nt, nx, ny
    else:
        print("No")
        break
else:
    print("Yes")

-n = int(eval(input())) +from sys import stdin + +input = stdin.readline +lines = stdin.readlines +N = int(eval(input())) +txy = ((list(map(int, line.split()))) for line in lines()) -for _ in range(n): -    nt, nx, ny = list(map(int, input().split())) +for nt, nx, ny in txy: