import sys

N = int(input())
old_t = 0
old_x = 0
old_y = 0
for i in sys.stdin:
    a = list(map(int, i.split(' ')))
    t = a[0]
    x = a[1]
    y = a[2]
    if (a[1] > N or a[2] > N):
        print('No')
        sys.exit(0)
    if ((x + y) > t + 1):
        print('No')
        sys.exit(0)
    if (t % 2 != (x + y) % 2):
        print('No')
        sys.exit(0)
    if (abs(x-old_x) + abs(y-old_y) > (t-old_t)):
        print('No')
        sys.exit(0)
    else:
        old_t = t
        old_x = x
        old_y = y
print('Yes')
