N = int(eval(input()))

I = [[int(i) for i in input().split()] for j in range(N)]



current, time = (0, 0), 0

for i in range(N):

    dist = abs(current[0] - I[i][1]) + abs(current[1] - I[i][2])

    if dist > I[i][0] - time or (I[i][0]- time - dist) % 2 == 1:

        print("No")

        break

    current, time = (I[i][1], I[i][2]), I[i][0]

else:

    print("Yes")
import sys



def solve():

    N = int(eval(input()))

    cx, cy = 0, 0

    nt = 0

    for _ in range(N):

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

        rem = t - nt - abs(x - cx) - abs(y - cy)

        if rem < 0 or rem % 2 > 0:

            print("No")

            break

        cx, cy = x, y

        nt = t

    else: print("Yes")

        

    return 0



if __name__ == "__main__":

    solve()
N = int(eval(input()))
I = [[int(i) for i in input().split()] for j in range(N)]
current, time = (0, 0), 0
for i in range(N):
    dist = abs(current[0] - I[i][1]) + abs(current[1] - I[i][2])
    if dist > I[i][0] - time or (I[i][0] - time - dist) % 2 == 1:
        print("No")
        break
    current, time = (I[i][1], I[i][2]), I[i][0]
else:
    print("Yes")

import sys


def solve():
    N = int(eval(input()))
    cx, cy = 0, 0
    nt = 0
    for _ in range(N):
        t, x, y = list(map(int, input().split()))
        rem = t - nt - abs(x - cx) - abs(y - cy)
        if rem < 0 or rem % 2 > 0:
            print("No")
            break
        cx, cy = x, y
        nt = t
    else:
        print("Yes")
    return 0


if __name__ == "__main__":
    solve()

-N = int(eval(input())) -I = [[int(i) for i in input().split()] for j in range(N)] -current, time = (0, 0), 0 -for i in range(N): -    dist = abs(current[0] - I[i][1]) + abs(current[1] - I[i][2]) -    if dist > I[i][0] - time or (I[i][0] - time - dist) % 2 == 1: -        print("No") -        break -    current, time = (I[i][1], I[i][2]), I[i][0] -else: -    print("Yes") +import sys + + +def solve(): +    N = int(eval(input())) +    cx, cy = 0, 0 +    nt = 0 +    for _ in range(N): +        t, x, y = list(map(int, input().split())) +        rem = t - nt - abs(x - cx) - abs(y - cy) +        if rem < 0 or rem % 2 > 0: +            print("No") +            break +        cx, cy = x, y +        nt = t +    else: +        print("Yes") +    return 0 + + +if __name__ == "__main__": +    solve()