N,S = map(int, input().split()) v = 1 while S>=v*(v+1)//2: v+=1 L = list(range(1,v+1)) L.remove(v*(v+1)//2-S) print(len(L)) print(*L)