fun main(args : Array<String>) {
    val s = readLine()!!.toLong()
    val sqrt = Math.sqrt(s.toDouble()).toLong()

    if (sqrt * sqrt == s) {
        println("0 0 $sqrt 0 0 $sqrt")
        return
    }

    val diff = (sqrt+1) * (sqrt+1) - s
    println("0 0 ${sqrt+1} 1 $diff ${sqrt+1}")
}