program Project1;
var
  a,n,i,j:integer;
  p:array[1..5] of integer;
  z:array[1..5] of integer;

begin
  read(n,a);
  j:=0;
  if a>=n then writeln(-1) else
  for i:= 1 to 5 do
  begin
    p[i]:=0;
    z[i]:=0;
  end;
  repeat
    for i:=1 to 5 do
  while p[i]+z[i]<=a do
begin
  if a-1=p[i] then p[i]:= p[i]+1 else p[i]:=p[i]+2;
  z[i]:=z[i]+1;
end;
    j:=j+p[i]+z[i]
until j=n ;
  for i:=1 to 5 do writeln(p[i],z[i]);
end.