Program triangle;
uses crt;
var a,b,c,p,s: real;
begin clrscr;
write('a = ');
readln(a);
write('b = ');
readln(b);
write('c = ');
readln(c);
writeln;
p:=a+b+c;
Writeln('P = ', p:0:3);
p:=p/2;
s:= sqrt(p*(p-a)*(p-b)*(p-c));
Writeln('S = ', s:0:3);
readln;
end.