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

const main = (input) => {
  const inputMax = 1e18;

  // 素因数分解する

  let factors = [];
  if (input === 1) {
    return [1];
  } else {
    let init = 2;

    while ( input !== 1 ) {
      let i = init;
      while (i < inputMax) {
        if (input % i === 0) {
          factors.push(i)
          input /= i;
          break;
        }
        i++;
      }
      init = i;
    }
  }

  // 因数の配列を、X座標とY座標に振り分けていく
  let x = 1, y = 1;
  for (let j = 0; j < factors.length; j++) {
    if (j % 2 === 1) {
      x *= factors[j];
    } else {
      y *= factors[j];
    }
  }

  return `0 0 ${x} 0 0 ${y}`;
};

console.log(main(input));