import sys

can = True; eval(input())

e = [[0, 0, 0]] + [list(map(int, e.split())) for e in sys.stdin]

for a, b in zip(e[1:], e):

    t = a[0] - b[0] - abs(a[1] - b[1]) - abs(a[2] - b[2])

    if t < 0 or t % 2 == 1: can = False; break

print((['No', 'Yes'][can]))
import sys

ans = 'Yes'; eval(input())

for e in sys.stdin:

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

    t = t - x - y

    if t < 0 or t % 2 == 1: ans = 'No'; break

print(ans)
import sys

can = True
eval(input())
e = [[0, 0, 0]] + [list(map(int, e.split())) for e in sys.stdin]
for a, b in zip(e[1:], e):
    t = a[0] - b[0] - abs(a[1] - b[1]) - abs(a[2] - b[2])
    if t < 0 or t % 2 == 1:
        can = False
        break
print((["No", "Yes"][can]))

import sys

ans = "Yes"
eval(input())
for e in sys.stdin:
    t, x, y = list(map(int, e.split()))
    t = t - x - y
    if t < 0 or t % 2 == 1:
        ans = "No"
        break
print(ans)

-can = True +ans = "Yes" -e = [[0, 0, 0]] + [list(map(int, e.split())) for e in sys.stdin] -for a, b in zip(e[1:], e): -    t = a[0] - b[0] - abs(a[1] - b[1]) - abs(a[2] - b[2]) +for e in sys.stdin: +    t, x, y = list(map(int, e.split())) +    t = t - x - y -        can = False +        ans = "No" -print((["No", "Yes"][can])) +print(ans)