N = int(eval(input()))

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

switch = 0

for li in L:

    t = li[0]

    co = li[1]+li[2]

    if t >= co:

        if co % 2 == 0 and t % 2 == 0:

            pass

        elif co % 2 != 0 and t % 2 != 0:

            pass

        else:

            switch += 1

            break

    else:

        switch += 1

        break

if switch == 0:

    print('Yes')

else:

    print('No')

N = int(eval(input()))

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



now_x, now_y = 0, 0

pre_t = 0



for t, x, y in txy:

    walk = abs(now_x - x) + abs(now_y - y)

    if t - pre_t < walk:

        print('No')

        exit()

    if (t-pre_t) % 2 != walk % 2:

        print('No')

        exit()

    now_x = x

    now_y = y

    pre_t = t



print('Yes')
N = int(eval(input()))
L = [list(map(int, input().split())) for _ in range(N)]
switch = 0
for li in L:
    t = li[0]
    co = li[1] + li[2]
    if t >= co:
        if co % 2 == 0 and t % 2 == 0:
            pass
        elif co % 2 != 0 and t % 2 != 0:
            pass
        else:
            switch += 1
            break
    else:
        switch += 1
        break
if switch == 0:
    print("Yes")
else:
    print("No")

N = int(eval(input()))
txy = [list(map(int, input().split())) for _ in range(N)]
now_x, now_y = 0, 0
pre_t = 0
for t, x, y in txy:
    walk = abs(now_x - x) + abs(now_y - y)
    if t - pre_t < walk:
        print("No")
        exit()
    if (t - pre_t) % 2 != walk % 2:
        print("No")
        exit()
    now_x = x
    now_y = y
    pre_t = t
print("Yes")

-L = [list(map(int, input().split())) for _ in range(N)] -switch = 0 -for li in L: -    t = li[0] -    co = li[1] + li[2] -    if t >= co: -        if co % 2 == 0 and t % 2 == 0: -            pass -        elif co % 2 != 0 and t % 2 != 0: -            pass -        else: -            switch += 1 -            break -    else: -        switch += 1 -        break -if switch == 0: -    print("Yes") -else: -    print("No") +txy = [list(map(int, input().split())) for _ in range(N)] +now_x, now_y = 0, 0 +pre_t = 0 +for t, x, y in txy: +    walk = abs(now_x - x) + abs(now_y - y) +    if t - pre_t < walk: +        print("No") +        exit() +    if (t - pre_t) % 2 != walk % 2: +        print("No") +        exit() +    now_x = x +    now_y = y +    pre_t = t +print("Yes")