fun main(args:Array<String>) {
	val n = readLine()!!.toInt()
	val p = (1..n).map{ readLine()!!.split(" ").map{it.toInt()} }
	var (t,x,y)= listOf(0,0,0)
	p.forEach {
		val (dt,dx,dy)= listOf(it[0]-t,Math.abs(it[1]-x),Math.abs(it[2]-y))
		if( dt%2!=(dx+dy)%2 || dt<dx+dy){
			println("No")
			return
		}else{
			t=it[0]; x=it[1]; y=it[2]
		}
	}
	println("Yes")
}