ledangninhWukong
:
Var n,i,dem,j:longint;
A:array[1..100000] of longint;
Begin
Readln(n);
for i:= 1 to n do read(A[i]);
For i:=1 to n do
Begin
dem:=0;
for j:=1 to trunc(sqrt(A[i]))do
if A[i] mod j=0 then inc(dem);
If (dem=1) and (A[i]>1) then writeln(A[i],' ');
end;
Readln;
readln
end.