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