<Problem>
http://ntucoder.net/Problem/Details/133
USES CRT;
var n,m,i,j,temp1:longint;
begin
readln(n,m);
for i:=1 to m div 5 do
for j:=1 to m div 3 do begin
temp1:=n-i-j;
if (((i*5)+(j*3)+(
temp1 div 3)=m)
and (temp1 mod 3=0) and (temp1>0)) then
begin
writeln(i,' ',j,' ',temp1);
exit;
end;
end;
writeln(-1);
end.