const main = (input) => {
  const smax = input / 2;
  let prime = [2];
  let x = [0];
  let y = [0];
  for (let n = 3; n <= smax; n++) {
  	let bool = true;
  	let pmax = prime.length;
  	for (let m = 0; m < pmax; m++) {
  		if ((n % prime[m]) === 0) {
  			bool = false;
  			break;
  		}
  		if (prime[m] >= (n / prime[m])) {break;}
  	}
  	if (bool) {
  		prime[pmax] = n;
  	}
  }
  let width = 1;
  let i = 1;
  while(i <= prime.length){
    if(input % prime[i] === 0){
      width *= prime[i];
    }else{
      i--;
    }
    if(input / width <= 10**9){
      break;
    }
  }
  x.push(width);
  x.push(0);
  y.push(0);
  y.push(input/width);
  console.log(`${x[0]} ${y[0]} ${x[1]} ${y[1]} ${x[2]} ${y[2]}`);

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
