
import java.util.*

fun main(args:Array<String>): Unit {
    val n = readLine()!!.toInt()
    val k = (1 .. (n + 1)).find{it * (it - 1) / 2 == n}
    when(k){
        null -> println("No")
        else -> {
            println("Yes")
            println(k)
            val array = Array(k){LinkedList<Int>()}
            var count = 1
            for (a in 0 until k){
                for (b in (a + 1) until k){
                    array[a].add(count)
                    array[b].add(count)
                    ++count
                }
            }
            for (queue in array){
                println(
                        queue.joinToString(" ", "${queue.size} "){it.toString()}
                )
            }
        }
    }
}