Problem:


Score : 300 points

Problem Statement

AtCoDeer the deer is going on a trip in a two-dimensional plane.
In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.

If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1).
Note that he cannot stay at his place.
Determine whether he can carry out his plan.

Constraints

1 ≤ N ≤ 10^5

0 ≤ x_i ≤ 10^5

0 ≤ y_i ≤ 10^5

1 ≤ t_i ≤ 10^5

t_i < t_{i+1} (1 ≤ i ≤ N-1)

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
t_1 x_1 y_1
t_2 x_2 y_2
:
t_N x_N y_N

Output

If AtCoDeer can carry out his plan, print Yes; if he cannot, print No.

Sample Input 1

2
3 1 2
6 1 1

Sample Output 1

Yes

For example, he can travel as follows: (0,0), (0,1), (1,1), (1,2), (1,1), (1,0), then (1,1).

Sample Input 2

1
2 100 100

Sample Output 2

No

It is impossible to be at (100,100) two seconds after being at (0,0).

Sample Input 3

2
5 1 1
100 1 1

Sample Output 3

No



Sample input:
2
3 1 2
6 1 1


Sample output:
Yes

Submission status: Accepted

Solution code:
import subprocess
import gzip, base64, os
import stat

gz = b'H4sIAIwyaV0C/+19e2BUxfX/3c2D5ZVdFDS8JOiqASRkIUAiihtg4a5sIJqA+MDLZrMhi0k23927EKxVMIllXaK0P2ttv63FPqxf+7W11lq0FoMIsa0gqCiCCFqwd4kIvjBVZL/nzMzdzL17bwTbX/9ylcw9nzkzc+bMmTOP+5g7PL65VotFUH9WYaaA1O4RbkK7Gd4cSLMAVir0h79jhFFCLtA5HJ9bcGvCHpa1GtoYXxb8y4Z/pVZKl1rdmnAU41NDCxfmCPzPrQlrFwuaUBAK0ulQ1r1LKbp36TJN2JNFcUc/bTorS9fD0vWo/CwUrIImVOuXzf5VM7ya1UsN5zC+ORw//iqPyLV4XV9J6fpKtyZsY3xtunTXQLpc4cx/DhZey8oz00shk18N1Xa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37h9kpw1pmesqqTt4+DszWd1PTM7GNDDfjGFlDwY3OwjboIwYn3eq5DA5P1psBVE/1YRlHR2daFzlxOBPmzsLW518bDUv1MDaC8ugRt4Y9DP0Tm/T8G8/s1nqDMvWgXL1xas+c1tcu87RmfRVrolHOItIHlmc0xhmdYux2c6fyZp69bOgzMg5izsxEe1i1US7aA9+1ORgeE29y7Lo2b3pgsYE7+HrHj+tcTTBcpzen9CHt2hqQ0ffrHQGuK5O8TZthQmd8ArfBQDqdH0hJY6406+4mp5sbtSd3PLpOFeQJM6NzzTPN5t9wfrfBMGhQOzaeZTg6zaHZEMcOtCbCTUOzh/Vx5lDCHW+eWRY7oNxACP3p7Zmm3Ly6t+VdJZmHgOtS4Bnc1K/9HzaZqUIziwAA'
bin = gzip.decompress(base64.b64decode(gz))
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
with open(pymain, "wb") as f:
    f.write(bin)
os.chmod(pymain, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
if p == "":
    pymain = "./" + pymain
subprocess.call(pymain)


# compiled by pythran
'''
#pythran export main2()
def main2():
    stdin = open('/dev/stdin')
    N = int(stdin.readline())
    t0 = 0
    x0 = 0
    y0 = 0
    for _ in range(N):
        t1, x1, y1 = map(int, stdin.readline().split())
        t = t1 - t0
        r = abs(x1 - x0) + abs(y1 - y0)
        if t < r or t & 1 != r & 1:
            print('No')
            return
        t0 = t1
        x0 = x1
        y0 = y1
    print('Yes')
'''