import sys



def main():

    N = int(eval(input()))

    t = [0] * (N+1)

    x = [0] * (N+1)

    y = [0] * (N+1)

    for i in range(1, N+1):

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

    

    flag = 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 % 2 != dist % 2 or dt < dist:

            flag = False

            break

            

    print(('Yes' if flag else 'No'))

    

    



if __name__ == '__main__':

    main()
import sys



def main():

    def input():

      return sys.stdin.readline().rstrip()

    

    N = int(eval(input()))

    t = [0] * (N+1)

    x = [0] * (N+1)

    y = [0] * (N+1)

    for i in range(1, N+1):

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

    

    flag = 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 % 2 != dist % 2 or dt < dist:

            flag = False

            break

            

    print(('Yes' if flag else 'No'))

    

    



if __name__ == '__main__':

    main()
import sys


def main():
    N = int(eval(input()))
    t = [0] * (N + 1)
    x = [0] * (N + 1)
    y = [0] * (N + 1)
    for i in range(1, N + 1):
        t[i], x[i], y[i] = list(map(int, input().split()))
    flag = 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 % 2 != dist % 2 or dt < dist:
            flag = False
            break
    print(("Yes" if flag else "No"))


if __name__ == "__main__":
    main()

import sys


def main():
    def input():
        return sys.stdin.readline().rstrip()

    N = int(eval(input()))
    t = [0] * (N + 1)
    x = [0] * (N + 1)
    y = [0] * (N + 1)
    for i in range(1, N + 1):
        t[i], x[i], y[i] = list(map(int, input().split()))
    flag = 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 % 2 != dist % 2 or dt < dist:
            flag = False
            break
    print(("Yes" if flag else "No"))


if __name__ == "__main__":
    main()

+    def input(): +        return sys.stdin.readline().rstrip() +