program Project1;
var
 n,x,a:longint;

begin
  read(n,a);
  if (n<3*a) then writeln('-1')
  else
       begin
                  x:=n-2*a;
              if (x mod 2=0) then
                     begin
                         writeln(a,' ',0);
                         writeln(a,' ',0) ;
                     end
                  else
                  begin
                      writeln(a,' ',1);
                      writeln(a,' ',0) ;
                  end;
                  if x>=2*a-1 then
                  begin
                     writeln(x div 2 + 1,' ',x div 2 - 1 );
                  end
                  else write(a,' ',x-a) ;
              end;
       end.