n, s = map(int, input().split()) ans = [] for i in range(n, 0, -1): if s>=i: s -= i ans.append(i) if s>0: print(-1) else: ans = ans[::-1] print(len(ans)) print(" ".join(map(str, ans)))