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