n = int(input())

my_pos_x = 0
my_pos_y = 0

for i in range(n):
    place = list(map(int, input().split()))
    for j in range(place[0]):
        if my_pos_x < place[1]:
            my_pos_x = + 1
            continue
        elif my_pos_x > place[1]:
            my_pos_x = - 1
            continue
        else:
            if my_pos_y < place[2]:
                my_pos_y = + 1
                continue
            elif my_pos_y > place[2]:
                my_pos_y = + -1
                continue
            else:
                my_pos_x += 1

if my_pos_x == place[1] and my_pos_y == place[2]:
    print("YES")
else:
    print("NO")
