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