let () =
    let main () =
        let s = int_of_string (read_line ()) in
        let x1 = 0 in
        let y1 = 0 in
        let sq = int_of_float (ceil (sqrt (float (s)))) in
        let sq = (sq + 3) / 2 * 2 in
        let x2 = sq in
        let y3 = sq in
        let sq2 = x2 * y3 - s in
        let y2 = 1 in
        let x3 = sq2 / y2 in
        Printf.printf "%d %d %d %d %d %d" x1 y1 x2 y2 x3 y3
    in
    main ()