const main = (input) => {
  let x = [0];
  let y = [0];
  let width = 1;
  let root = parseInt(Math.sqrt(input));
  while(true){
    if(input % root === 0){
      break;
    }else{
      root--;
    }
  }
  x.push(root);
  x.push(0);
  y.push(0);
  y.push(input/root);
  console.log(`${x[0]} ${y[0]} ${x[1]} ${y[1]} ${x[2]} ${y[2]}`);

}

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