n,s=map(int,input().split()) ans = [] for i in range(n,0,-1): if s < i: continue s-=i ans.append(i) if s != 0: print(-1) exit() print(len(ans)) print(*ans[::-1])