uses crt;
var l, m, n: integer;
s: int64 = 0; p: int64 = 1;
yes: boolean = false;
A: array of integer;
begin
clrscr();
write('n: ');
readln(n);
setlength(A, n);
for m := 0 to n-1 do
begin
write(m + 1: 4, ') ');
readln(A[m]);
if odd(A[m]) then
if A[m] mod 3 = 0 then
begin
yes := true;
s := s + A[m];
p := p * A[m];
end
end;
if yes then
begin
writeln('Сумма: ', s);
writeln('Произведение: ', p)
end
end.