','program prim;
uses crt;
var n,k: integer;
a1,a2,a3,c:longint;
function F(x:integer):longint;
var i: integer;
rez:longint;
Begin
rez:=1;
for i:=1 to x do
rez:=rez+i;
F:=rez;
end;
Begin
clrscr;
writeln('ww'
readln(n,k);
a1:=F;
a2:=F(k);
a3:=F(n-k);
writeln(a1,',',a2,',',a3);
readln;
end.
uses crt;
var n,k: integer;
a1,a2,a3,c:longint;
function F(x:integer):longint;
var i: integer;
rez:longint;
Begin
rez:=1;
for i:=1 to x do
rez:=rez+i;
F:=rez;
end;
Begin
clrscr;
writeln('ww'
readln(n,k);
a1:=F;
a2:=F(k);
a3:=F(n-k);
writeln(a1,',',a2,',',a3);
readln;
end.