n = gets.to_i
txy_array = []
n.times { |_| txy_array << gets.split(" ").map(&:to_i) }
current = [0, 0, 0]
 
def travel(current, txy)
  ct, cx, cy = current
  nt, nx, ny = txy
  time = nt - ct
  len = (nx - cx).abs + (ny - cy).abs

  if len > time || (time - len).odd?
    puts "NO"
    exit
  end
end

txy_array.each do |txy|
	travel(current, txy)
    current = txy
end

puts "YES"