N=int(eval(input()))

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

ans=0

for i in range(N):

    t,x,y=txy[i][0],txy[i][1],txy[i][2]

    if x+y<=t and t%2==(x+y)%2:ans+=1

print(("Yes" if ans==N else "No"))
n = int(eval(input()))



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



for i in range(n):

    t, x, y = txy[i]

    if  x + y > t or (t - x - y) % 2:

        print("No")

        exit()

print("Yes")

N = int(eval(input()))
txy = [list(map(int, input().split())) for i in range(N)]
ans = 0
for i in range(N):
    t, x, y = txy[i][0], txy[i][1], txy[i][2]
    if x + y <= t and t % 2 == (x + y) % 2:
        ans += 1
print(("Yes" if ans == N else "No"))

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

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