program zad2;
var n,a,i,j,m:longint;
begin
  read(n,a);
  m:=n;
  if n>=3*a then
    begin
      while (n>0) do
        begin
          for i:=1 to 5*a do
            for j:=1 to 5*a do
              if ((i+j)<=n) and ((i+j)>=(n div 5)) and (abs(i-j)>13) then
                  begin
                      n:=n-i-j;
                      writeln(i,' ',j);
                  end
                else
                  begin

                  end;
        end;
    end
  else
    write(-1);
end.