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