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

void main()
{
    auto S = readln.chomp.to!long;

    auto p = S.to!double.sqrt.to!long;
    auto d = S - p^^2;

    writefln("%d %d %d %d %d %d", 0, 0, p, -d, 1, p);
}