program xxx;
var z,d,k : integer;
begin
z:=2; d:=7; k:=0;
while (d>=z) do
d:=d-z;
k:=k+1
end;
writeln(d,' ',k);
readln
end.
program first;
var z,d,k:integer;
writeln('Input z,d,k');
readln(z,d,k);
if (d>=z) then
d:=d-z
readln;
program xxx;
var z,d,k : integer;
begin
z:=2; d:=7; k:=0;
while (d>=z) do
begin
d:=d-z;
k:=k+1
end;
writeln(d,' ',k);
readln
end.
program first;
var z,d,k:integer;
begin
writeln('Input z,d,k');
readln(z,d,k);
if (d>=z) then
d:=d-z
k:=k+1
writeln(d,' ',k);
readln;
end.