
def find(b, c, d):
    min_path = c + d
    cnt = 0

    for i in range(1000):
        act_path = min_path + 4 * i
        if(act_path == b):
            cnt += 1
        else:
            cnt += 0

    return cnt


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

count = 0

for i in range(N):
    diff_x = x[i] - x[i-1]
    diff_y = y[i] - y[i-1]
    diff_t = t[i] - t[i-1]

    count += find(diff_t, diff_x, diff_y)

if(count == N):
    print('Yes')
else:
    print('No')
