# Q.C

N = int(eval(input()))

txy = [[0,0,0]]

for i in range(N):

    txy.append(list(map(int,input().split(" "))))





def matchdist(x,y):

    dt = abs(x[0]-y[0])

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

    if ds%2 == dt%2 and ds<=dt:

        return True

    else:

        return False

flag = False

for i in range(N):

    if matchdist(txy[i],txy[i+1]):

        continue

    else:

        print("No")

        flag = True

        break

if not flag:

    print("Yes")
import sys

batch = 0

lines = 0

ans = []

for line in sys.stdin:

    if line == None or line == '\n':

        break

        

    cur = line.split(" ")

    if len(cur) == 1:

        lines = int(cur[0])

        batch = 0

        continue

    

    else:

        batch += 1

        if int(cur[0]) < int(cur[1]) + int(cur[2]):

            ans.append(0)

        elif (int(cur[0]) - int(cur[1]) - int(cur[2])) % 2 == 0:

            ans.append(1)

        else:

            ans.append(0)

        

        if batch == lines:

            prod = 1

            for n in ans:

                prod *= n

            if prod == 0:

                print("No")

            else:

                print("Yes")
# Q.C
N = int(eval(input()))
txy = [[0, 0, 0]]
for i in range(N):
    txy.append(list(map(int, input().split(" "))))


def matchdist(x, y):
    dt = abs(x[0] - y[0])
    ds = abs(x[1] - y[1]) + abs(x[2] - y[2])
    if ds % 2 == dt % 2 and ds <= dt:
        return True
    else:
        return False


flag = False
for i in range(N):
    if matchdist(txy[i], txy[i + 1]):
        continue
    else:
        print("No")
        flag = True
        break
if not flag:
    print("Yes")

import sys

batch = 0
lines = 0
ans = []
for line in sys.stdin:
    if line == None or line == "\n":
        break
    cur = line.split(" ")
    if len(cur) == 1:
        lines = int(cur[0])
        batch = 0
        continue
    else:
        batch += 1
        if int(cur[0]) < int(cur[1]) + int(cur[2]):
            ans.append(0)
        elif (int(cur[0]) - int(cur[1]) - int(cur[2])) % 2 == 0:
            ans.append(1)
        else:
            ans.append(0)
        if batch == lines:
            prod = 1
            for n in ans:
                prod *= n
            if prod == 0:
                print("No")
            else:
                print("Yes")

-# Q.C -N = int(eval(input())) -txy = [[0, 0, 0]] -for i in range(N): -    txy.append(list(map(int, input().split(" ")))) +import sys - -def matchdist(x, y): -    dt = abs(x[0] - y[0]) -    ds = abs(x[1] - y[1]) + abs(x[2] - y[2]) -    if ds % 2 == dt % 2 and ds <= dt: -        return True -    else: -        return False - - -flag = False -for i in range(N): -    if matchdist(txy[i], txy[i + 1]): +batch = 0 +lines = 0 +ans = [] +for line in sys.stdin: +    if line == None or line == "\n": +        break +    cur = line.split(" ") +    if len(cur) == 1: +        lines = int(cur[0]) +        batch = 0 -        print("No") -        flag = True -        break -if not flag: -    print("Yes") +        batch += 1 +        if int(cur[0]) < int(cur[1]) + int(cur[2]): +            ans.append(0) +        elif (int(cur[0]) - int(cur[1]) - int(cur[2])) % 2 == 0: +            ans.append(1) +        else: +            ans.append(0) +        if batch == lines: +            prod = 1 +            for n in ans: +                prod *= n +            if prod == 0: +                print("No") +            else: +                print("Yes")