import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    auto K = readln.chomp.to!int;
    writeln("3 3");
    auto IK = 0b100000000000000000 + K;
    auto IO = 0b100000000000000000;
    auto OK = K;
    auto ans =
    [[IK, IO, 0],
     [OK, IK, OK],
     [0, 0, OK]];
    foreach (a; ans)  {
        foreach (b; a) write(b, " ");
        writeln;
    }
}
