#include <bits/stdc++.h>
using namespace std;
struct edg{int s, e, x;};
vector<edg> v;
int main(){
for(int i=1; i<=1998; i++){
v.push_back({i, i+1, 100000000});
v.push_back({i, 2000, 10000});
for(int j=i+3; j<=1998; j++){
v.push_back({i, j, 1});
v.push_back({j, i, 1});
}
}
printf("2000 %d\n", v.size());
// for(auto &i : v) printf("%d %d %d\n", i.s, i.e, i.x);
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKc3RydWN0IGVkZ3tpbnQgcywgZSwgeDt9Owp2ZWN0b3I8ZWRnPiB2OwogCmludCBtYWluKCl7Cglmb3IoaW50IGk9MTsgaTw9MTk5ODsgaSsrKXsKCQl2LnB1c2hfYmFjayh7aSwgaSsxLCAxMDAwMDAwMDB9KTsKCQl2LnB1c2hfYmFjayh7aSwgMjAwMCwgMTAwMDB9KTsKCQlmb3IoaW50IGo9aSszOyBqPD0xOTk4OyBqKyspewoJCQl2LnB1c2hfYmFjayh7aSwgaiwgMX0pOwoJCQl2LnB1c2hfYmFjayh7aiwgaSwgMX0pOwoJCX0KCX0KCXByaW50ZigiMjAwMCAlZFxuIiwgdi5zaXplKCkpOwovLwlmb3IoYXV0byAmaSA6IHYpIHByaW50ZigiJWQgJWQgJWRcbiIsIGkucywgaS5lLCBpLngpOwp9CiA=