fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val txyList = Array(n) {
        readLine()!!.split(" ").map(String::toInt).let { Triple<Int, Int, Int>(it[0], it[1], it[2]) }
    }

    var current = Triple(0, 0, 0)
    for (txy in txyList) {
        val (distT, distX, distY) = txy

        val (srcT, srcX, srcY) = current

        val time = distT - srcT
        val distance = Math.abs(distX - srcX) + Math.abs(distY - srcY)
        if (distance > time || time % distance != 0) {
            println("No")
            return
        }

        current = txy
    }
    println("Yes")

}


