{-------------------------------
 Po zadannim vershinam
 treugolnika nayti ego S i P.
 -------------------------------
  # Max Tkachenko # Group 112 #
 -------------------------------
}

Program task_3_28___J(input,output);

 var
  x1,y1, x2,y2, x3,y3 : real;
  S, P : real;
  i : integer;


 begin
  writeln('Input M1:');
  readln(x1,y1);

  writeln('Input M2:');
  readln(x2,y2);

  writeln('Input M3:');
  readln(x3,y3);

 {----------- S -----------}
  { Determinant
   S = |x1-x3 y1-y3| * 1/2
       |x2-x3 y2-y3|
  }

  S := abs( ( (x1-x3)*(y2-y3) - (x2-x3)*(y1-y3) ) * 0.5 );

  writeln('S = ', S);

 {---------- P ------------}
  P := 0;
  P := sqrt(sqr(x2 - x1) + sqr (y2 - y1));
  P := P + sqrt(sqr(x3 - x2) + sqr (y3 - y2));
  P := P + sqrt(sqr(x1 - x3) + sqr (y1 - y3));

  writeln('P = ', P);
  readln;
 end.