N=eval(input())

a=[]

t=True

for _ in range(int(N)):

    a+=[list(map(int,input().split()))]

for i in range(int(N)):

    if a[i][0]%2==0:

        if abs(a[i][1]+a[i][2])<=a[i][0] and (a[i][1]+a[i][2])%2==0:

            continue

        else:

            print('No')

            t=False

            break

    else:

        if abs(a[i][1]+a[i][2]<=a[i][0]) and (a[i][1]+a[i][2])%2==1:

            continue

        else:

            print('No')

            t=False

            break

if t:

    print('Yes')
import sys

n=int(eval(input()))

t=[]

for i in range(n):

    t.append(list(map(int,input().split())))

for i,d in enumerate(t):

    if i>0:

        b=d[0]-a

        c=abs(d[1]+d[2]-aa)

    a=d[0]

    aa=d[1]+d[2]

    if i==0:

        if not (a >= aa and a % 2 == aa % 2):

            print('No')

            sys.exit()

        else:

            continue

    if not (b>=c and b%2==c%2):

        print('No')

        sys.exit()

print('Yes')
N = eval(input())
a = []
t = True
for _ in range(int(N)):
    a += [list(map(int, input().split()))]
for i in range(int(N)):
    if a[i][0] % 2 == 0:
        if abs(a[i][1] + a[i][2]) <= a[i][0] and (a[i][1] + a[i][2]) % 2 == 0:
            continue
        else:
            print("No")
            t = False
            break
    else:
        if abs(a[i][1] + a[i][2] <= a[i][0]) and (a[i][1] + a[i][2]) % 2 == 1:
            continue
        else:
            print("No")
            t = False
            break
if t:
    print("Yes")

import sys

n = int(eval(input()))
t = []
for i in range(n):
    t.append(list(map(int, input().split())))
for i, d in enumerate(t):
    if i > 0:
        b = d[0] - a
        c = abs(d[1] + d[2] - aa)
    a = d[0]
    aa = d[1] + d[2]
    if i == 0:
        if not (a >= aa and a % 2 == aa % 2):
            print("No")
            sys.exit()
        else:
            continue
    if not (b >= c and b % 2 == c % 2):
        print("No")
        sys.exit()
print("Yes")

-N = eval(input()) -a = [] -t = True -for _ in range(int(N)): -    a += [list(map(int, input().split()))] -for i in range(int(N)): -    if a[i][0] % 2 == 0: -        if abs(a[i][1] + a[i][2]) <= a[i][0] and (a[i][1] + a[i][2]) % 2 == 0: +import sys + +n = int(eval(input())) +t = [] +for i in range(n): +    t.append(list(map(int, input().split()))) +for i, d in enumerate(t): +    if i > 0: +        b = d[0] - a +        c = abs(d[1] + d[2] - aa) +    a = d[0] +    aa = d[1] + d[2] +    if i == 0: +        if not (a >= aa and a % 2 == aa % 2): +            print("No") +            sys.exit() +        else: -        else: -            print("No") -            t = False -            break -    else: -        if abs(a[i][1] + a[i][2] <= a[i][0]) and (a[i][1] + a[i][2]) % 2 == 1: -            continue -        else: -            print("No") -            t = False -            break -if t: -    print("Yes") +    if not (b >= c and b % 2 == c % 2): +        print("No") +        sys.exit() +print("Yes")