import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long s = sc.nextLong();
		sc.close();

		List<Integer> list = new ArrayList<>();
		long r = s;
		int x = n;
		while (r > 0) {
			if (x > r) {
				x = (int) r;
			}
			list.add(x);
			r -= x;
			x--;
		}

		System.out.println(list.size());
		StringBuilder sb = new StringBuilder();
		for (int i = list.size() - 1; i >= 0; i--) {
			sb.append(list.get(i)).append(' ');
		}
		sb.deleteCharAt(sb.length() - 1);
		System.out.println(sb.toString());
	}
}