N = int(eval(input()))

flag = 'Yes'

txy = [[0,0,0]]

for i in range(N):

    a = list(map(int,input().split()))

    txy.append(a)

    td = txy[i+1][0] - txy[i][0]

    xd = abs(txy[i+1][1] - txy[i][1])

    yd = abs(txy[i+1][2] - txy[i][2])

    if (td < xd + yd) or ((td-(xd+yd))%2 == 1):

        flag = 'No'

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

now = [0,0]

tnow = 0

ans = 'Yes'

for i in range(N):

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

    dis = abs(x-now[0]) + abs(y-now[1])

    if t-tnow >= dis and (t-tnow)%2 == dis%2:

        tnow = t

        now = [x,y]

    else:

        ans = 'No'

        break

print(ans)
N = int(eval(input()))
flag = "Yes"
txy = [[0, 0, 0]]
for i in range(N):
    a = list(map(int, input().split()))
    txy.append(a)
    td = txy[i + 1][0] - txy[i][0]
    xd = abs(txy[i + 1][1] - txy[i][1])
    yd = abs(txy[i + 1][2] - txy[i][2])
    if (td < xd + yd) or ((td - (xd + yd)) % 2 == 1):
        flag = "No"
print(flag)

N = int(eval(input()))
now = [0, 0]
tnow = 0
ans = "Yes"
for i in range(N):
    t, x, y = list(map(int, input().split()))
    dis = abs(x - now[0]) + abs(y - now[1])
    if t - tnow >= dis and (t - tnow) % 2 == dis % 2:
        tnow = t
        now = [x, y]
    else:
        ans = "No"
        break
print(ans)

-flag = "Yes" -txy = [[0, 0, 0]] +now = [0, 0] +tnow = 0 +ans = "Yes" -    a = list(map(int, input().split())) -    txy.append(a) -    td = txy[i + 1][0] - txy[i][0] -    xd = abs(txy[i + 1][1] - txy[i][1]) -    yd = abs(txy[i + 1][2] - txy[i][2]) -    if (td < xd + yd) or ((td - (xd + yd)) % 2 == 1): -        flag = "No" -print(flag) +    t, x, y = list(map(int, input().split())) +    dis = abs(x - now[0]) + abs(y - now[1]) +    if t - tnow >= dis and (t - tnow) % 2 == dis % 2: +        tnow = t +        now = [x, y] +    else: +        ans = "No" +        break +print(ans)