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