function max(a,b,c:integer; var min,max:integer): integer;
var
d,e:integer;
begin
d:=a;
e:=a;
if b>d then d:=b;
if c>d then d:=c;
if b<e then e:=b ;
if c<e then e:=c;
max:=d;
min:=e;
end;
var
a,b,c,d,e,rez:integer;
begin
write('1-chislo=');
readln(a);
write('2-chislo=');
readln(b);
write('3-chislo=');
readln(c);
max(a,b,c,d,e);
if e>12 then rez:=a+b+c;
if d<=12 then rez:=a*b*c;
writeln('max=',e);
writeln('min=',d);
writeln(rez);
end.