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

    long x1 = 1L;
    long x2 = 10L ^^ 9;
    long y1 = (s + x2 - 1) / x2;
    long y2 = x2 * y1 - s;

    writeln(0, " ", 0, " ", x1, " ", y1, " ", x2, " ", y2);
}

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