N,S=map(int,input().split()) ans=[] for i in range(N,0,-1): if S>=i: ans.append(i) S-=i print(len(ans)) print(*ans[::-1])