def is_reachable(dept, dest):

    distance = abs(dest[1] - dept[1]) + abs(dest[2] - dept[2])

    time = dest[0] - dept[0]

    if (time - distance >= 0) and ((time - distance) % 2 == 0):

        return True

    else:

        return False





N = int(eval(input()))

itin = [(0, 0, 0)]

itin_append = itin.append

for n in range(N):

    itin_append(tuple(map(int, input().split())))



for n in range(N):

    if is_reachable(itin[n], itin[n + 1]):

        continue

    else:

        print('No')

        break

else:

    print('Yes')

import sys





N = int(eval(input()))

t, x, y = 0, 0, 0

ans = 'No'

for s in sys.stdin.readlines():

    nt, nx, ny = list(map(int, s.split()))

    T = nt - t

    D = abs(nx - x) + abs(ny - y)

    if T < D or T % 2 != D % 2:

        break

    t, x, y = nt, nx, ny

else:

    ans = 'Yes'



print(ans)

def is_reachable(dept, dest):
    distance = abs(dest[1] - dept[1]) + abs(dest[2] - dept[2])
    time = dest[0] - dept[0]
    if (time - distance >= 0) and ((time - distance) % 2 == 0):
        return True
    else:
        return False


N = int(eval(input()))
itin = [(0, 0, 0)]
itin_append = itin.append
for n in range(N):
    itin_append(tuple(map(int, input().split())))
for n in range(N):
    if is_reachable(itin[n], itin[n + 1]):
        continue
    else:
        print("No")
        break
else:
    print("Yes")

import sys

N = int(eval(input()))
t, x, y = 0, 0, 0
ans = "No"
for s in sys.stdin.readlines():
    nt, nx, ny = list(map(int, s.split()))
    T = nt - t
    D = abs(nx - x) + abs(ny - y)
    if T < D or T % 2 != D % 2:
        break
    t, x, y = nt, nx, ny
else:
    ans = "Yes"
print(ans)

-def is_reachable(dept, dest): -    distance = abs(dest[1] - dept[1]) + abs(dest[2] - dept[2]) -    time = dest[0] - dept[0] -    if (time - distance >= 0) and ((time - distance) % 2 == 0): -        return True -    else: -        return False - +import sys -itin = [(0, 0, 0)] -itin_append = itin.append -for n in range(N): -    itin_append(tuple(map(int, input().split()))) -for n in range(N): -    if is_reachable(itin[n], itin[n + 1]): -        continue -    else: -        print("No") +t, x, y = 0, 0, 0 +ans = "No" +for s in sys.stdin.readlines(): +    nt, nx, ny = list(map(int, s.split())) +    T = nt - t +    D = abs(nx - x) + abs(ny - y) +    if T < D or T % 2 != D % 2: +    t, x, y = nt, nx, ny -    print("Yes") +    ans = "Yes" +print(ans)