program chia_3_khong_2;
uses crt;
var A:array[1..1000] of integer;
n,i,d:integer;
begin
clrscr;
write('Nhap so luong phan tu cua day: '); readln(n);
d:=0;
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
if (A[i] mod 3=0) and (A[i] mod 2<>0) then d:=d+1;
end;
write('Co 'd,' so thoa man');
for i:=1 to n do
if (A[i] mod 3=0) and (A[i] mod 2<>0) then write(A[i],' ');
readln;
end.