program text;
uses crt;
var i:integer;
a,b,c,ha,hb,hc,p,S:real;
X,Y:array[1..3] of integer;
Begin
clrscr;
Writeln('Nhap toa do cac dinh A, B, C:');
for i:= 1 to 3 do readln(X[i],Y[i]);
a:=sqrt(sqr(X[2]-X[3])+sqr(Y[2]-Y[3]));
b:=sqrt(sqr(X[1]-X[3])+sqr(Y[1]-Y[3]));
c:=sqrt(sqr(X[2]-X[1])+sqr(Y[2]-Y[1]));
p:= (a+b+c)/2;
S:= sqrt(p*(p-a)*(p-b)*(p-c));
Writeln('Dien tich cua tam giac la: ',S:0:4);
ha:=2*S/a;
hb:=2*S/b;
hc:=2*S/c;
writeln('ha = ',ha:0:2,' hb = ',hb:0:2,' hc = ',hc:0:2);
readln;
end.