fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val list = (0 until n).map {
        val (t, x, y) = readLine()!!.split(' ').map { it.toInt() }
        Triple(t, x, y)
    }
    var t = 0
    var x = 0
    var y = 0

    val ans = list.all {

        val d1 = (it.first - t)
        val d2 = (Math.abs(it.second - x) + Math.abs(it.third - y))

        t = it.first
        x = it.second
        y = it.third

        d1 >= d2 && (d1 % 2 == d2 % 2)
    }

    println(if (ans) "Yes" else "No")
}