AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.
# AtCoder
N = int(input())
txy = [list(map(int, input().split())) for _ in range(N)]

if txy[0][0] < txy[0][1]+txy[0][2]:
    print('No')
    exit()

for i in range(1, N):
    ct = txy[i][0]
    cx = txy[i][1]
    cy = txy[i][2]
    pt = txy[i-1][0]
    px = txy[i-1][1]
    py = txy[i-1][2]

    cxy = cx + cy
    pxy = px + py

    difxy = abs(cxy - pxy)
    dift = abs(ct-pt)
    print(difxy, dift)
    if dift % 2 != 0 and difxy % 2 == 0:
        print('No')
        exit()
    elif dift % 2 == 0 and difxy % 2 != 0:
        print('No')
        exit()

    if difxy > dift:
        print('No')
        exit()
print('Yes')

N = int(input())
pt, px, py = 0, 0, 0
for _ in range(N):
    ct, cx, cy = map(int, input().split())
    diff_t = ct - pt
    diff_x = cx - px
    diff_y = cy - py

    diff_xy = abs(diff_x+diff_y)
    if diff_xy > diff_t:
        print('No')
        exit()
    if (diff_xy + diff_t) % 2 != 0:
        print('No')
        exit()

    px = cx
    py = cy
    pt = ct

print('Yes')