
N=gets.to_i
f=true;
t[1],a[1],b[1] = gets.chomp.split(" ").map(&:to_i)
for n in (2..N) do
    t[n],a[n],b[n] = gets.chomp.split(" ").map(&:to_i)
    if((abs(a[n]-a[n-1])+abs(b[n]-b[n-1]))>1)
        f=false
        break;
    end
end
if f
    puts('Yes')
else
    puts('No')    
end
