#!/usr/bin/perl
#
# Given stdin with three lines, each of form
#
#      x   y
#
# compute the area of the triangle that they define.
#
# MWR 10/16/2016

$debug = 1;

$num = 0;
while (<STDIN>) {
  $line = $_;
  if ($line =~ /^#/) {
    next;
  }
  
  @words = split(/\s+/, " " . $line);
  if ($#words != 2) {
    printf "error: each line must have 2 values:  x  y \n";
    exit(1);
  }

  $x[$num] = $words[1];
  $y[$num] = $words[2];

  $num++;
}

if ($num != 3) {
  printf "error: input must have exactly 3 lines, one per vertex of triangle \n";
  exit(1);
}

$area = abs(  ($x[0] - $x[2])*($y[1] - $y[0]) - ($x[0] - $x[1])*($y[2] - $y[0]) );

printf " area is %12.5f \n", $area;







exit 0;
