import sys if sys.platform =='ios': import clipboard a=clipboard.get() a = a.split('\n') text = '\n'.join(a) with open('input_file.txt','w') as f: f.write(text) sys.stdin = open('input_file.txt') ans = [] n,s = map(int,input().split()) for i in range(n,0,-1): if s-i >= 0: s -= i ans.append(i) else: continue if s == 0: break print(ans) if s != 0: exit(print(-1)) print(max(ans)) print(*ans[::-1])