Var a,b,c,m : integer;
Begin
Readln(a,b,c);
If (a>b) and (b>c) and (c>0) then
Begin
a:=a*a; b:=b*b; c:=c*c;
end else
If (a<0) and (b<0) and (c<0) and (a<>b) and (a<>c) and (b<>c) then
Begin
m:=a;
If b>m then m:=b;
If c>m then m:=c;
a:=m; b:=m; c:=m;
end else
Begin
Writeln('Сумма: ',a+b+c);
halt(0);
end;
Writeln('A = ',a,' B =',b,' C = ',c);
end.