program pil_3_28_g(input,output);
var
  x1, y1, z1, x2, y2, z2, x3, y3, z3 : integer;
  S, P, halfP : real;
  a, b, c, t1, t2, t3 : real;
begin
	write('Input x1, y1, z1 : ');
  read(x1, y1, z1);
  writeLn;
	write('Input x2, y2, z2 : ');
  read(x2, y2, z2);
  writeLn;
	write('Input x3, y3, z3 : ');
  read(x3, y3, z3);
  writeLn;

  t1 := x1-x2; t2 := y1-y2; t3 := z1-z2;
	a := sqrt(t1*t1 + t2*t2 + t3*t3);
  t1 := x3-x2; t2 := y3-y2; t3 := z3-z2;
	b := sqrt(t1*t1 + t2*t2 + t3*t3);
  t1 := x1-x3; t2 := y1-y3; t3 := z1-z3;
	c := sqrt(t1*t1 + t2*t2 + t3*t3);

  P := a + b + c;
  halfP := P/2;
  S := sqrt(halfP*(halfP-a)*(halfP-b)*(halfP-c));
  writeLn('Perimeter is ', P:1:2);
  writeLn('Sqare is ', S:1:1);
end.