uses crt;
var n,i,j:integer;
s,kt:array[1..10000] of integer;
begin
clrscr;
write('so so hang: ');readln(n);
for i:=1 to n do
begin
write('nhap so thu ',i,' : ');readln(s);
end;
writeln('sau khi kiem tra: ');
for i:=1 to n do
begin
kt:=0;
for j:=2 to s-1 do
if s mod j=0 then kt:=kt+1;
if kt<>0 then write(s,' ');
end;
readln;
end.