fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val points = mutableListOf(Triple(0, 0, 0))
    for (n in 0 until N) {
        val (t, x, y) = readLine()!!.split(" ").map { it.toInt() }
        points.add(Triple(t, x, y))
    }
    var can = true
    for (i in 0 until N) {
        val p = points[i]
        val p1 = points[i + 1]
        val dt = p1.first - p.first
        val dist = kotlin.math.abs(p1.second - p.second) + kotlin.math.abs(p1.third - p.third)
        if (dt < dist) {
            can = false
        }
        if (dist % 2 != dt % 2) {
            can = false
        }
    }
    print(if (can) "Yes" else "No")
}
