f=50 v=[f] w=[1] for i in range(2,1001): tmp=i cnt=0 for j in range(1,i): if tmp>=j: tmp-=w[j-1] cnt+=v[j-1] v.append(cnt+1) w.append(i) print(len(v),1000) for i in range(len(v)): print(v[i],w[i])