program da;
var br,min,i:integer;
begin

read(br,min);
if min*3>br then write(-1)
else
begin
    write(min);
    write(' ');
    write(0);
    writeln;
br:=br-(2*min);

if br mod 2=0 then
begin
    write(min);
    write(' ');
    write(0);
    writeln;
    if br<min*2-2 then
    begin
    write(min);
    write(' ');
    write(br-min);
    end
    else
    begin
    write((br div 2)+1);
    write(' ');
    write((br div 2)-1);
    end;
end
else
begin
    write(min);
    write(' ');
    write(1);
    writeln;
    if br<min*2-2 then
    begin
    write(min);
    write(' ');
    write(br-min);
    end
    else
    begin
    write((br div 2)+1);
    write(' ');
    write((br div 2)-1);
    end;
end;
end;
end.