N = int(eval(input()))



ts = [0]

xs = [0]

ys = [0]



for _ in range(N):

    t,x,y = [ int(a) for a in input().split() ]

    ts.append(t)

    xs.append(x)

    ys.append(y)



good = True

for i in range(N):



    dist = abs(xs[i]-xs[i+1])+abs(ys[i]-ys[i+1]) 

    time = ts[i+1]-ts[i]

    # Parity

    if dist%2 != time%2:

        good = False



    # Distance

    if dist > time:

        good = False



if good:

    print('Yes')

else:

    print('No')

n = int(input())



x = 0

y = 0

t = 0

do = True

for i in range(0, n):

 z = input().split(" ")

 nt = int(z[0])

 nx = int(z[1])

 ny = int(z[2])

 dt = nt - t

 dx = nx - x

 dy = ny - y

 t = nt

 x = nx

 y = ny

 

 if (abs(dx)+abs(dy))%2 != (dt)%2:

  do = False

  break

 if abs(dx)+abs(dy) > abs(dt):

  do = False

  break

if do:

 print("Yes")

else:

 print("No")

N = int(eval(input()))
ts = [0]
xs = [0]
ys = [0]
for _ in range(N):
    t, x, y = [int(a) for a in input().split()]
    ts.append(t)
    xs.append(x)
    ys.append(y)
good = True
for i in range(N):
    dist = abs(xs[i] - xs[i + 1]) + abs(ys[i] - ys[i + 1])
    time = ts[i + 1] - ts[i]
    # Parity
    if dist % 2 != time % 2:
        good = False
    # Distance
    if dist > time:
        good = False
if good:
    print("Yes")
else:
    print("No")

n = int(input())
x = 0
y = 0
t = 0
do = True
for i in range(0, n):
    z = input().split(" ")
    nt = int(z[0])
    nx = int(z[1])
    ny = int(z[2])
    dt = nt - t
    dx = nx - x
    dy = ny - y
    t = nt
    x = nx
    y = ny
    if (abs(dx) + abs(dy)) % 2 != (dt) % 2:
        do = False
        break
    if abs(dx) + abs(dy) > abs(dt):
        do = False
        break
if do:
    print("Yes")
else:
    print("No")

-N = int(eval(input())) -ts = [0] -xs = [0] -ys = [0] -for _ in range(N): -    t, x, y = [int(a) for a in input().split()] -    ts.append(t) -    xs.append(x) -    ys.append(y) -good = True -for i in range(N): -    dist = abs(xs[i] - xs[i + 1]) + abs(ys[i] - ys[i + 1]) -    time = ts[i + 1] - ts[i] -    # Parity -    if dist % 2 != time % 2: -        good = False -    # Distance -    if dist > time: -        good = False -if good: +n = int(input()) +x = 0 +y = 0 +t = 0 +do = True +for i in range(0, n): +    z = input().split(" ") +    nt = int(z[0]) +    nx = int(z[1]) +    ny = int(z[2]) +    dt = nt - t +    dx = nx - x +    dy = ny - y +    t = nt +    x = nx +    y = ny +    if (abs(dx) + abs(dy)) % 2 != (dt) % 2: +        do = False +        break +    if abs(dx) + abs(dy) > abs(dt): +        do = False +        break +if do: