import java.lang.Math.min
import java.lang.Math.sqrt

fun main(args: Array<String>) {
    val s = readLine()!!.toLong()
    var a: Int = 0
    var b: Int = 0

    val cx = min(sqrt((s - 1).toDouble()).toInt() + 1, 1000000000)
    val d = (cx.toLong() * cx.toLong() - s)
    val cy = cx - d / cx
    val d2 = cx.toLong() * cy - s
    if(d2 != 0L){
        for(i in min(sqrt(d2.toDouble()).toInt(), cx) downTo 1){
            if(d2 % i == 0L){
                a = i
                b = (d2 / i).toInt()
                break
            }
        }
    }
    print("0 ${cy-b} ${cx-a} 0 $cx $cy")
}