import sys def main(): n, s = map(int, input().split()) ans = [] for i in range(n, 0, -1): if i <= s: ans.append(i) s -= i print(len(ans)) print(*ans[::-1]) if __name__ == '__main__': main()