from random import random as rand

used = [[0]*1000]*1000

print 1000,3000
for i in range(3000):
    print int(rand()*1000)+1,int(rand()*1000)+1,int(rand()*3)+1
	#print 1,i+1,int(rand()*3)+1
	#print 2,i+2,int(rand()*3)+1
	#print 3,i+3,int(rand()*3)+1
