fun main() {
    val s = readLine()?.toLong() ?: return
    val (x1, x2) = listOf(1e9.toLong(), 1L)

    val y2 = s / x1 + if (s % x1 == 0L) {
        0
    } else {
        1
    }
    val y1 = x1 * y2 - s
    println("0 0 $x1 $y1 $x2 $y2")
}