"use strict";
const input = parseInt(require("fs").readFileSync("/dev/stdin", "utf8"));
// const inputs = input.trim().split("\n").map(x => parseInt);
// const input = 3;

const main = (input) => {
  let a,b,c,d,left;
  let sqrt = Math.sqrt(input);
  a = Math.ceil(sqrt);
  d = Math.ceil(sqrt);
  left = a * d - input;
  if (left === 0) {
    b = 0;
    c = 0;
  } else {
    b = 1;
    c = left;
  }

  return `0 0 ${a} ${b} ${c} ${d}`;
};

console.log(main(input));