#yuki1915 N, K = map(int, input().split()) if K <= N: print(1) print(K) exit() if K > N*(N+1)//2: print(-1) exit() ans = [] temp = K for i in range(N, 0, -1): temp -= i ans.append(i) if temp < i - 1: if i != 0: ans.append(temp) ans.reverse() print(len(ans)) print(*ans) exit() ans.reverse() print(len(ans)) print(*ans) exit()