import kotlin.math.abs

fun main(){
    val n = readLine()!!.toInt()
    val plan = MutableList(n){
        readLine()!!.split(" ").map{it.toInt()}
    }
    var nt = 0
    var nx = 0
    var ny = 0

    plan.forEach{
        var dt = abs(it[0] - nt)
        var dx = abs(it[1] - nx)
        var dy = abs(it[2] - ny)
        if(dt < dx + dy){
            println("No")
            return
        }
        else if(dt % 2 == (dx + dy) % 2){
            nt = it[0]
            nx = it[1]
            ny = it[2]
        }
        else{
            println("No")
            return
        }
    }
    println("Yes")
}