Program programma;
uses crt;
var
a:array[1..100]of integer;
i,max,p:integer;
begin
clrscr;
p:=1;
for i:=1 to 9 do
begin
write('a[',i,'] = ');
readln(a[i]);
end;
for i:=1 to 9 do
begin
if a[i]> max then max:=a[i];
end;
for i:=1 to 9 do
begin
if a[i]<> max then
p:=p* a[i]
end;
writeln;
writeln('max = ', max);
write('P = ',p);
end.