n, s = map(int, input().split()) a = [] for i in range(n, 0, -1): if s >= i: s -= i a.append(i) a.reverse() print(len(a)) print(*a)