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.
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x + y + t) % 2:
        print("No")
        exit()
print("Yes")
# 11th
n = int(input())
a = [[int(i) for i in input().split()] for j in range(n)]
t = [i[0] for i in a]
x = [i[1] for i in a]
y = [i[2] for i in a]
tmpt=0
tmpx=0
tmpy=0
for i in range(n):
    tmp = (t[i] - tmpt) - abs(x[i] - tmpx) - abs(y[i] - tmpy)
    tmpt = t[i]
    tmpx = x[i]
    tmpy = y[i]
    if tmp >= 0 and tmp%2 == 0:
        continue
    print("No")
    break
else:
    
    print("Yes")