# ABC086 C - Traveling

import numpy as np

n = int(eval(input()))

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



if n == 1:

    if l[0][0] >= l[0][1]+l[0][2]:

        if l[0][0]%2 == (l[0][1]+l[0][2])%2:

            pass

        else:

            print('No')

            exit()    

    else:

        print('No')

        exit()

for i in range(n-1):

    t = l[i+1][0]-l[i][0]

    x = abs(l[i+1][1]-l[i][1])

    y = abs(l[i+1][2]-l[i][2])

    if t >= x+y:

        if t%2 == (x+y)%2:

            pass

        else:

            print('No')    

            exit()

    else:

        print('No')

        exit()

print('Yes')
n=int(eval(input()))

l=[]

for i in range(n):

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

    l.append([t,x,y])



if n==1:

    d=l[0][1]+l[0][2]

    tt=l[0][0]

    if tt%2==1:

        if d<=tt and d%2==1:

            print('Yes')

            exit()

        else:

            print('No')

            exit()

    elif tt%2==0:

        if d<=tt and d%2==0:

            print('Yes')

            exit()

        else:

            print('No')

            exit()



for i in range(n-1):

    d=abs(l[i+1][1]-l[i][1])+abs(l[i+1][2]-l[i][2])

    tt=l[i+1][0]-l[i][0]

    if tt%2==1:

        if d<=tt and d%2==1:

            continue

        else:

            print('No')

            exit()

    elif tt%2==0:

        if d<=tt and d%2==0:

            continue

        else:

            print('No')

            exit()

print('Yes')
# ABC086 C - Traveling
import numpy as np

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

n = int(eval(input()))
l = []
for i in range(n):
    t, x, y = list(map(int, input().split()))
    l.append([t, x, y])
if n == 1:
    d = l[0][1] + l[0][2]
    tt = l[0][0]
    if tt % 2 == 1:
        if d <= tt and d % 2 == 1:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
    elif tt % 2 == 0:
        if d <= tt and d % 2 == 0:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
for i in range(n - 1):
    d = abs(l[i + 1][1] - l[i][1]) + abs(l[i + 1][2] - l[i][2])
    tt = l[i + 1][0] - l[i][0]
    if tt % 2 == 1:
        if d <= tt and d % 2 == 1:
            continue
        else:
            print("No")
            exit()
    elif tt % 2 == 0:
        if d <= tt and d % 2 == 0:
            continue
        else:
            print("No")
            exit()
print("Yes")

-# ABC086 C - Traveling -import numpy as np - -l = [list(map(int, input().split())) for _ in range(n)] +l = [] +for i in range(n): +    t, x, y = list(map(int, input().split())) +    l.append([t, x, y]) -    if l[0][0] >= l[0][1] + l[0][2]: -        if l[0][0] % 2 == (l[0][1] + l[0][2]) % 2: -            pass +    d = l[0][1] + l[0][2] +    tt = l[0][0] +    if tt % 2 == 1: +        if d <= tt and d % 2 == 1: +            print("Yes") +            exit() -    else: -        print("No") -        exit() -for i in range(n - 1): -    t = l[i + 1][0] - l[i][0] -    x = abs(l[i + 1][1] - l[i][1]) -    y = abs(l[i + 1][2] - l[i][2]) -    if t >= x + y: -        if t % 2 == (x + y) % 2: -            pass +    elif tt % 2 == 0: +        if d <= tt and d % 2 == 0: +            print("Yes") +            exit() -    else: -        print("No") -        exit() +for i in range(n - 1): +    d = abs(l[i + 1][1] - l[i][1]) + abs(l[i + 1][2] - l[i][2]) +    tt = l[i + 1][0] - l[i][0] +    if tt % 2 == 1: +        if d <= tt and d % 2 == 1: +            continue +        else: +            print("No") +            exit() +    elif tt % 2 == 0: +        if d <= tt and d % 2 == 0: +            continue +        else: +            print("No") +            exit()