object Main {
  def main(args: Array[String]) = {

    val pw = new java.io.PrintWriter(System.out)
    val sc = new java.util.Scanner(System.in)
    val S = sc.nextLong
    sc.close()

    val num = 1000000000L
//    val s1 = S / num
//    val s2 = S % num
    //  pw.println(s"${s1 + s2} ${s2} ${num - 1} ${num} 0 0")
    val x = (num - S % num) % num
    val y = (S + x) / num
    pw.println(s"0 0 ${num} 1 ${x} ${y} ")

    pw.flush()
  }
}