uses crt;
var a:array[1..100]of integer;
i,n:integer;
s:longint;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{------------xuat-day-----------------}
for i:=1 to n do write(a[i]:4);
{-----------xu-ly----------------------}
s:=1;
for i:=1 to n do
begin
if (a[i] mod 3=0) and (a[i] mod 5 =0) then s:=s*a[i];
end;
writeln('tich cua cac phan tu vua chia het cho 3 vua chia het chia 5 trong day so la: ',s);
readln;
end.