import sys

def main():

  _int = int

  n = int(eval(input()))

  data = [[_int(e) for e in input().split()] for _ in range(n)]

  t, x, y = 0, 0, 0

  for d in data:

    rt = d[0] - t - abs(x - d[1]) - abs(y - d[2])

    if rt < 0 or rt & 1 == 1:

      print('No')

      sys.exit()

    t, x, y = d

  print('Yes')

main()

from sys import exit

n = int(eval(input()))

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

t = 0

x = 0

y = 0

for d in data:

  duration = d[0] - t

  distance = abs(x - d[1]) + abs(y - d[2])

  if (distance > duration) or ((duration - distance) % 2 == 1):

    print('No')

    exit()

  t = d[0]

  x = d[1]

  y = d[2]

print('Yes')

import sys


def main():
    _int = int
    n = int(eval(input()))
    data = [[_int(e) for e in input().split()] for _ in range(n)]
    t, x, y = 0, 0, 0
    for d in data:
        rt = d[0] - t - abs(x - d[1]) - abs(y - d[2])
        if rt < 0 or rt & 1 == 1:
            print("No")
            sys.exit()
        t, x, y = d
    print("Yes")


main()

from sys import exit

n = int(eval(input()))
data = [list(map(int, input().split())) for _ in range(n)]
t = 0
x = 0
y = 0
for d in data:
    duration = d[0] - t
    distance = abs(x - d[1]) + abs(y - d[2])
    if (distance > duration) or ((duration - distance) % 2 == 1):
        print("No")
        exit()
    t = d[0]
    x = d[1]
    y = d[2]
print("Yes")

-import sys +from sys import exit - -def main(): -    _int = int -    n = int(eval(input())) -    data = [[_int(e) for e in input().split()] for _ in range(n)] -    t, x, y = 0, 0, 0 -    for d in data: -        rt = d[0] - t - abs(x - d[1]) - abs(y - d[2]) -        if rt < 0 or rt & 1 == 1: -            print("No") -            sys.exit() -        t, x, y = d -    print("Yes") - - -main() +n = int(eval(input())) +data = [list(map(int, input().split())) for _ in range(n)] +t = 0 +x = 0 +y = 0 +for d in data: +    duration = d[0] - t +    distance = abs(x - d[1]) + abs(y - d[2]) +    if (distance > duration) or ((duration - distance) % 2 == 1): +        print("No") +        exit() +    t = d[0] +    x = d[1] +    y = d[2] +print("Yes")