N = int(input())

t, x, y = [0]*(N+1), [0]*(N+1), [0]*(N+1)
t[0] = x[0] = y[0] = 0
result = "YES"

def is_even(num):
    return num % 2 == 0

for i in range(1, N+1):
    t[i], x[i], y[i] = list(map(int, input().split()))

for i in range(1, N+1):
    time = t[i] - t[i-1]
    xlen = abs(x[i] - x[i-1])
    ylen = abs(y[i] - y[i-1])
    distance = xlen+ylen
    if is_even(time) == is_even(distance) and distance <= time:
        continue
    result = "NO"
    break

print(result)