import std.stdio, std.conv, std.string, std.array, std.math, std.regex, std.range, std.ascii;
import std.typecons, std.functional;
import std.algorithm, std.container;

void scanValues(TList...)(ref TList list)
{
    auto lit = readln.splitter;
    foreach(ref e; list)
    {
        e = lit.fornt.to!(typeof(e));
        lit.popFront;
    }
}
T[] scanArray(T = long)()
{
    return readln.split.to!(long[]);
}
void scanStructs(T)(ref T[] t, size_t n)
{
    t.length = n;
    foreach(ref e; t)
    {
        auto line = readln.split;
        foreach(i, ref v; e.tupleof)
        {
            v = line[i].to!(typeof(v));
        }
    }
}
T scanElem(T = long)()
{
    string res;
    int c = ' ';
    while (isWhite(c) && c!=-1)
    {
        c = getchar;
    }
    while (!isWhite(c) && c!=-1)
    {
        res ~= cast(char)c;
        c = getchar;
    }
    return res.strip.to!T;
}
template fold(fun...)
if (fun.length >= 1)
{
    auto fold(R, S...)(R r, S seed)
    {
        static if (S.length < 2)
        {
            return reduce!fun(seed, r);
        }
        else
        {
            import std.typecons : tuple;
            return reduce!fun(tuple(seed), r);
        }
    }
}

struct Factor{
    long n;
    long c;
}
Factor[] factors(long n)
{
    Factor[] res;
    for(long i = 2; i^^2 <= n;i++)
    {
        if(n%i!=0)
            continue;

        int c;
        while(n%i==0)
        {
            n = n/i;
            c++;
        }
        res ~= Factor(i, c);
    }
    if(n!=1)
        res ~= Factor(n, 1);

    return res;
}
bool isPrime(long n)
{
    if(n<=1) return false;
    if(n==2) return true;
    if(n%2==0) return false;
    for(long i = 3; i^^2 <= n;i+=2)
        if(n%i==0) return false;
    return true;
}

void main()
{
    const L = scanElem();
    writeln("4 6");
    writeln("1 4 0");
    writeln("1 2 0");
    writeln("2 4 1");
    writeln("1 3 1");
    writeln("3 4 1");
    writeln("1 3 2");
}
