import std.algorithm;
import std.array;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

struct Frac {
    long nume;
    long deno;
}

Frac area(long x1, long y1, long x2, long y2, long x3, long y3) {
    long sx = x2 - x1;
    long sy = y2 - y1;
    long tx = x3 - x1;
    long ty = y3 - y1;
    return Frac(abs(sx * ty - tx * sy), 2);
}

void calc(long s) {
    // x2, y2 を固定する
    long x2 = 10 ^^ 9;
    long y2 = 1;

    // s = 10^9 * y3 - x3
    long y3 = s / x2;
    long x3 = x2 * y3 - s;

    writefln("%d %d %d %d %d %d", 0, 0, x2, y2, x3, y3);
}

void main() {
    long s = read!long;
    calc(s);
}
