n, s = map(int, input().split()) if s > (1 + n) * n // 2: print(-1) else: nouse = set() r = (1 + n) * n // 2 - s for i in range(n, 0, -1): if i <= r: nouse.add(i) r -= i ans = [i for i in range(1, n + 1) if i not in nouse] print(len(ans)) print(*ans)