N=int(eval(input()))

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

li.insert(0,[0,0,0])

ans="Yes"

for i in range(N):

  if li[i+1][0]-li[i][0]<abs(li[i+1][1]-li[i][1])+abs(li[i+1][2]-li[i][2]) or (li[i+1][0]-li[i][0])%2!=abs(li[i+1][1]-li[i][1]+li[i+1][2]-li[i][2])%2:

    ans="No"

print(ans)
N=int(eval(input()))

ans="Yes"

for _ in range(N):

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

  if t<x+y or t%2!=(x+y)%2:

    ans="No"

print(ans)
N = int(eval(input()))
li = [list(map(int, input().split())) for _ in range(N)]
li.insert(0, [0, 0, 0])
ans = "Yes"
for i in range(N):
    if (
        li[i + 1][0] - li[i][0]
        < abs(li[i + 1][1] - li[i][1]) + abs(li[i + 1][2] - li[i][2])
        or (li[i + 1][0] - li[i][0]) % 2
        != abs(li[i + 1][1] - li[i][1] + li[i + 1][2] - li[i][2]) % 2
    ):
        ans = "No"
print(ans)

N = int(eval(input()))
ans = "Yes"
for _ in range(N):
    t, x, y = list(map(int, input().split()))
    if t < x + y or t % 2 != (x + y) % 2:
        ans = "No"
print(ans)

-li = [list(map(int, input().split())) for _ in range(N)] -li.insert(0, [0, 0, 0]) -for i in range(N): -    if ( -        li[i + 1][0] - li[i][0] -        < abs(li[i + 1][1] - li[i][1]) + abs(li[i + 1][2] - li[i][2]) -        or (li[i + 1][0] - li[i][0]) % 2 -        != abs(li[i + 1][1] - li[i][1] + li[i + 1][2] - li[i][2]) % 2 -    ): +for _ in range(N): +    t, x, y = list(map(int, input().split())) +    if t < x + y or t % 2 != (x + y) % 2: