var c:array[0..15]of longint;
n,m,ans:longint;
procedure dfs1(x,y:longint);
var i:longint;
begin
if y=1 then begin inc(ans);exit;end;
for i:=c[m-y] to (x div y) do
begin
c[m-y+1]:=i;
dfs1(x-i,y-1);
end;
end;
procedure dfs2(x,y:longint);
var i:longint;
begin
if y=1 then begin for i:=1 to m-1 do write(c[i],' ');write(x);writeln;exit;end;
for i:=c[m-y] to (x div y) do
begin
c[m-y+1]:=i;
dfs2(x-i,y-1);
end;
end;
begin
assign(input,'dataa.in');
assign(output,'dataa.out');
reset(input);
rewrite(output);
read(n,m);
c[0]:=1;
dfs1(n,m);
writeln(ans);
dfs2(n,m);
close(input);
close(output);
end.