fun main(args: Array<String>) {
    val n= readLine()!!.toInt()
    var t = arrayOfNulls<Int>(n+1)
    var x = arrayOfNulls<Int>(n+1)
    var y = arrayOfNulls<Int>(n+1)
    t[0] = 0
    x[0] = 0
    y[0] = 0
    for( i in 1..n){
        var s = readLine()!!.split(" ").map{ num -> num.toInt()}
        t[i] = s[0]
        x[i] = s[1]
        y[i] = s[2]
    }

    var isOK = true

    for( i in 0..n-1){
        var abst = t[i + 1]!! - t[i]!!
        var absx = Math.abs(x[i + 1]!! - x[i]!!)
        var absy = Math.abs(y[i + 1]!! - y[i]!!)
        if( abst < absx + absy || abst % 2 != (absx + absy) % 2) {
            isOK = false
            break
        } else {
            continue
        }
    }
    println( if(isOK) "Yes" else "No")
}
