N = eval(input())

N = int(N)

t_list = [0]

x_list = [0]

y_list = [0]

for i in range(N):

    txy = eval(input())

    t, x, y = txy.split()

    t = int(t)

    x = int(x)

    y = int(y)

    t_list.append(t)

    x_list.append(x)

    y_list.append(y)







for i in range(1, N+1):

    t = t_list[i] - t_list[i-1]

    x = abs(x_list[i] - x_list[i-1])

    y = abs(y_list[i] - y_list[i-1])

    xy = x+y

    if t%2 == xy%2:

        res = 'Yes'

    elif not t%2 == xy%2:

        res = 'No'

    if t < xy:

        res = 'No'



print(res)

n = int(eval(input()))

for i in range(n):

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

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

        print('No')

        exit()

print('Yes')

N = eval(input())
N = int(N)
t_list = [0]
x_list = [0]
y_list = [0]
for i in range(N):
    txy = eval(input())
    t, x, y = txy.split()
    t = int(t)
    x = int(x)
    y = int(y)
    t_list.append(t)
    x_list.append(x)
    y_list.append(y)
for i in range(1, N + 1):
    t = t_list[i] - t_list[i - 1]
    x = abs(x_list[i] - x_list[i - 1])
    y = abs(y_list[i] - y_list[i - 1])
    xy = x + y
    if t % 2 == xy % 2:
        res = "Yes"
    elif not t % 2 == xy % 2:
        res = "No"
    if t < xy:
        res = "No"
print(res)

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

-N = eval(input()) -N = int(N) -t_list = [0] -x_list = [0] -y_list = [0] -for i in range(N): -    txy = eval(input()) -    t, x, y = txy.split() -    t = int(t) -    x = int(x) -    y = int(y) -    t_list.append(t) -    x_list.append(x) -    y_list.append(y) -for i in range(1, N + 1): -    t = t_list[i] - t_list[i - 1] -    x = abs(x_list[i] - x_list[i - 1]) -    y = abs(y_list[i] - y_list[i - 1]) -    xy = x + y -    if t % 2 == xy % 2: -        res = "Yes" -    elif not t % 2 == xy % 2: -        res = "No" -    if t < xy: -        res = "No" -print(res) +n = int(eval(input())) +for i in range(n): +    t, x, y = list(map(int, input().split())) +    if t < x + y or (x + y + t) % 2: +        print("No") +        exit() +print("Yes")