import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val s = in.readLine().toLong

    val n = 1000000000L

    val bx = n - s % n
    val by = (s + bx) / n

    out.println(
      List(
        List(0, 0),
        List(n, 1),
        List(bx, by)
      ).map(_.mkString(" ")).mkString(" ")
    )

    out.flush()
  }
}