Program hotrotinhoc_hoc24;
var a: array[1..32000] of integer;
i,n: integer;
begin
write('Nhap so phan tu : '); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
write('Cac so chia het cho 3 la : ');
for i:=1 to n do if a[i] mod 3=0 then write(a[i],' ');
readln
end.