N = int(input())

x_before = 0
y_before = 0
t_before = 0
ans = 'YES'

for i in range(N):
    t, x, y = map(int, input().split())
    
    #i番目とi+1番目までの距離
    distace = abs(x-x_before) + abs(y-y_before)
    
    #i番目とi+1番目までの時間
    time = abs(t-t_before)
    
    #i+1番目のtimeで行くことが可能か判定
    if((time-distace<0) or (time-distace%2!=0)):
        ans = 'NO'
        break
        
    #i+1番目のtimeで行くことが可能なら値を更新
    x_before = x
    y_before = y
    t_before = t
    
print(ans)