uses crt;
var a:array[1..100]of integer;
i,n,t,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
s:=1;
for i:=1 to n do
begin
t:=t+a[i];
s:=s*a[i];
end;
writeln('Tong la: ',t);
writeln('Tich la: ',s);
readln;
end.