N = int(eval(input()))

t = [0] * (N+1)

x = [0] * (N+1)

y = [0] * (N+1)

for i in range(N):

    t[i+1], x[i+1], y[i+1] = list(map(int, input().split()))



f = True

for i in range(N):

    dt = t[i+1] - t[i]

    dist = abs(x[i+1]-x[i]) + abs(y[i+1]-y[i])

    if dt < dist:

        f = False

    if dist%2 != dt%2:

        f = False



print(('Yes' if f else 'No'))
import sys



def main():

    N = int(eval(input()))

    t, x, y = 0, 0, 0



    for _ in range(N):

        next_t, next_x, next_y = [int(__) for __ in input().split()]



        delta_t = next_t - t

        distance = abs(next_x - x) + abs(next_y - y)



        if distance > delta_t:

            print("No")

            sys.exit()



        if (delta_t - distance) % 2 != 0:

            print("No")

            sys.exit()



        t, x, y = next_t, next_x, next_y



    print("Yes")



main()
N = int(eval(input()))
t = [0] * (N + 1)
x = [0] * (N + 1)
y = [0] * (N + 1)
for i in range(N):
    t[i + 1], x[i + 1], y[i + 1] = list(map(int, input().split()))
f = True
for i in range(N):
    dt = t[i + 1] - t[i]
    dist = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i])
    if dt < dist:
        f = False
    if dist % 2 != dt % 2:
        f = False
print(("Yes" if f else "No"))

import sys


def main():
    N = int(eval(input()))
    t, x, y = 0, 0, 0
    for _ in range(N):
        next_t, next_x, next_y = [int(__) for __ in input().split()]
        delta_t = next_t - t
        distance = abs(next_x - x) + abs(next_y - y)
        if distance > delta_t:
            print("No")
            sys.exit()
        if (delta_t - distance) % 2 != 0:
            print("No")
            sys.exit()
        t, x, y = next_t, next_x, next_y
    print("Yes")


main()

-N = int(eval(input())) -t = [0] * (N + 1) -x = [0] * (N + 1) -y = [0] * (N + 1) -for i in range(N): -    t[i + 1], x[i + 1], y[i + 1] = list(map(int, input().split())) -f = True -for i in range(N): -    dt = t[i + 1] - t[i] -    dist = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i]) -    if dt < dist: -        f = False -    if dist % 2 != dt % 2: -        f = False -print(("Yes" if f else "No")) +import sys + + +def main(): +    N = int(eval(input())) +    t, x, y = 0, 0, 0 +    for _ in range(N): +        next_t, next_x, next_y = [int(__) for __ in input().split()] +        delta_t = next_t - t +        distance = abs(next_x - x) + abs(next_y - y) +        if distance > delta_t: +            print("No") +            sys.exit() +        if (delta_t - distance) % 2 != 0: +            print("No") +            sys.exit() +        t, x, y = next_t, next_x, next_y +    print("Yes") + + +main()