n = int(input())

my_pos_x = 0
my_pos_y = 0

for i in range(n):
    t, x, y = map(int, input().split())
    for j in range(t):
        if my_pos_x < x:
            my_pos_x = + 1
            continue
        elif my_pos_x > x:
            my_pos_x = - 1
            continue
        else:
            if my_pos_y < y:
                my_pos_y = + 1
                continue
            elif my_pos_y > y:
                my_pos_y = + -1
                continue
            else:
                my_pos_x += 1

if my_pos_x == x and my_pos_y == y:
    print("YES")
else:
    print("NO")
