program test;
var
x, y, r, q:integer;
begin
read(x, y);
r := x;
q := 0;
while true do
if r >= y then begin
r := r - y;
q:= q + 1;
end
else
break;
end;
write(r, ' ', q);
end.
program test;
var
x, y, r, q:integer;
begin
read(x, y);
r := x;
q := 0;
while true do
begin
if r >= y then begin
r := r - y;
q:= q + 1;
end
else
break;
end;
write(r, ' ', q);
end.