N = int(eval(input()))

txy = [[0, 0, 0]]

txy.extend([list(map(int, input().split())) for i in range(N)])



for i in range(N):

    time = txy[i + 1][0] - txy[i][0]

    length = abs(txy[i + 1][1] - txy[i][1]) + abs(txy[i + 1][2] - txy[i][2])

    if time >= length and time % 2 == length % 2:

        continue

    else:

        print('No')

        exit()

print('Yes')
import sys

import numpy as np



read = sys.stdin.read





def main():

    N, *txy = list(map(int, read().split()))

    t = np.array([0] + txy[::3], np.int64)

    x = np.array([0] + txy[1::3], np.int64)

    y = np.array([0] + txy[2::3], np.int64)

    time = t[1:] - t[:-1]

    length = np.abs(y[1:] - y[:-1]) + np.abs(x[1:] - x[:-1])

    if np.any((time < length) | (time % 2 != length % 2)):

        print('No')

    else:

        print('Yes')





if __name__ == '__main__':

    main()

N = int(eval(input()))
txy = [[0, 0, 0]]
txy.extend([list(map(int, input().split())) for i in range(N)])
for i in range(N):
    time = txy[i + 1][0] - txy[i][0]
    length = abs(txy[i + 1][1] - txy[i][1]) + abs(txy[i + 1][2] - txy[i][2])
    if time >= length and time % 2 == length % 2:
        continue
    else:
        print("No")
        exit()
print("Yes")

import sys
import numpy as np

read = sys.stdin.read


def main():
    N, *txy = list(map(int, read().split()))
    t = np.array([0] + txy[::3], np.int64)
    x = np.array([0] + txy[1::3], np.int64)
    y = np.array([0] + txy[2::3], np.int64)
    time = t[1:] - t[:-1]
    length = np.abs(y[1:] - y[:-1]) + np.abs(x[1:] - x[:-1])
    if np.any((time < length) | (time % 2 != length % 2)):
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()

-N = int(eval(input())) -txy = [[0, 0, 0]] -txy.extend([list(map(int, input().split())) for i in range(N)]) -for i in range(N): -    time = txy[i + 1][0] - txy[i][0] -    length = abs(txy[i + 1][1] - txy[i][1]) + abs(txy[i + 1][2] - txy[i][2]) -    if time >= length and time % 2 == length % 2: -        continue +import sys +import numpy as np + +read = sys.stdin.read + + +def main(): +    N, *txy = list(map(int, read().split())) +    t = np.array([0] + txy[::3], np.int64) +    x = np.array([0] + txy[1::3], np.int64) +    y = np.array([0] + txy[2::3], np.int64) +    time = t[1:] - t[:-1] +    length = np.abs(y[1:] - y[:-1]) + np.abs(x[1:] - x[:-1]) +    if np.any((time < length) | (time % 2 != length % 2)): +        print("No") -        print("No") -        exit() -print("Yes") +        print("Yes") + + +if __name__ == "__main__": +    main()