import sys

input = sys.stdin.readline



n = int(eval(input()))

t = 0

x = 0

y = 0



l = [tuple(map(int, input().split())) for _ in range(n)]



for t1, x1, y1 in l:

    if (abs(x1 - x) + abs(y1 - y))/(t1 - t) > 1:

        print("No")

        exit()

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

        print("No")

        exit()

    x = x1

    y = y1

    t = t1



print("Yes")
import sys

input = sys.stdin.readline



def main():

    n = int(eval(input()))

    t = 0

    x = 0

    y = 0



    l = [tuple(map(int, input().split())) for _ in range(n)]



    for t1, x1, y1 in l:

        if (abs(x1 - x) + abs(y1 - y))/(t1 - t) > 1:

            print("No")

            exit()

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

            print("No")

            exit()

        x = x1

        y = y1

        t = t1



    print("Yes")

main()
import sys

input = sys.stdin.readline
n = int(eval(input()))
t = 0
x = 0
y = 0
l = [tuple(map(int, input().split())) for _ in range(n)]
for t1, x1, y1 in l:
    if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1:
        print("No")
        exit()
    if (abs(x1 - x) + abs(y1 - y)) % 2 != (t1 - t) % 2:
        print("No")
        exit()
    x = x1
    y = y1
    t = t1
print("Yes")

import sys

input = sys.stdin.readline


def main():
    n = int(eval(input()))
    t = 0
    x = 0
    y = 0
    l = [tuple(map(int, input().split())) for _ in range(n)]
    for t1, x1, y1 in l:
        if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1:
            print("No")
            exit()
        if (abs(x1 - x) + abs(y1 - y)) % 2 != (t1 - t) % 2:
            print("No")
            exit()
        x = x1
        y = y1
        t = t1
    print("Yes")


main()

-n = int(eval(input())) -t = 0 -x = 0 -y = 0 -l = [tuple(map(int, input().split())) for _ in range(n)] -for t1, x1, y1 in l: -    if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1: -        print("No") -        exit() -    if (abs(x1 - x) + abs(y1 - y)) % 2 != (t1 - t) % 2: -        print("No") -        exit() -    x = x1 -    y = y1 -    t = t1 -print("Yes") + + +def main(): +    n = int(eval(input())) +    t = 0 +    x = 0 +    y = 0 +    l = [tuple(map(int, input().split())) for _ in range(n)] +    for t1, x1, y1 in l: +        if (abs(x1 - x) + abs(y1 - y)) / (t1 - t) > 1: +            print("No") +            exit() +        if (abs(x1 - x) + abs(y1 - y)) % 2 != (t1 - t) % 2: +            print("No") +            exit() +        x = x1 +        y = y1 +        t = t1 +    print("Yes") + + +main()