n=io.read("*n")
t,x,y={},{},{}
for i=1,n do
    t[i],x[i],y[i]=io.read("*n","*n","*n")
end

feasible=true
for i=1,n-1 do
    manhattan=math.abs(x[i+1]-x[i])+math.abs(y[i+1]-y[i])
    time=t[i+1]-t[i]
    if time<manhattan then
        feasible=false
    end
    if time%2~=manhattan%2 then
        feasible=false
    end
end
if feasible then
    print("Yes")
else
    print("No")
end