mod = 998244353 def main(): import sys input = sys.stdin.readline N, S = map(int, input().split()) T = S ans = [] for n in range(N, 0, -1): if T >= n: T -= n ans.append(n) print(len(ans)) ans.reverse() print(*ans) if __name__ == '__main__': main()