Program Pr1; uses crt; var mas:array[byte] of integer; fl1,fl2:text; stroka:string; b,v,c,max,i:integer; Begin clrscr; assign(fl1,'E.in'); assign(fl2,'E.out'); reset(fl1); readln(fl1,stroka); close(fl1); for i:=1 to length(stroka) do val(stroka[i],mas[i],b); b:=length(stroka); max:=1; v:=0; for i:=1 to b do if mas[i]>v then if mas[i]>max then max:=mas[i] else v:=mas[i]; c:=max*v; rewrite(fl2); writeln(fl2,c); close(fl2); end.
Program Pr1;
uses crt;
var mas:array[byte] of integer;
fl1,fl2:text;
stroka:string;
b,v,c,max,i:integer;
Begin
clrscr;
assign(fl1,'E.in');
assign(fl2,'E.out');
reset(fl1);
readln(fl1,stroka);
close(fl1);
for i:=1 to length(stroka) do val(stroka[i],mas[i],b);
b:=length(stroka);
max:=1;
v:=0;
for i:=1 to b do if mas[i]>v then if mas[i]>max then max:=mas[i]
else v:=mas[i];
c:=max*v;
rewrite(fl2);
writeln(fl2,c);
close(fl2);
end.