program TimBoi4ChuSo;
var
n, i: integer;
begin
repeat
writeln('Nhap vao so nguyen n (2<n<100): ');
readln(n);
until (n > 2) and (n < 100);
writeln('Cac boi cua ', n, ' co 4 chu so la: ');
for i := 1000 to 9999 do
begin
if i mod n = 0 then
writeln(i);
end;
end.