Var
S,a,b:integer;
p:real;
begin
readln(a,b);p:=1;s:=0;
if a>b then
begin
while abs(a)>0 do
begin
s:=s+(abs(a) mod 10);
a:=a div 10;
end;
writeln('s = ',s)
end
else
begin
while abs(b)>0 do
begin
p:=p*(abs(b) mod 10);
b:=b div 10;
end;
writeln('P = ',p:4:2);
end;
end.