Var
x1, x2, x3, y1, y2, y3, s1, s2: real;
function length(x1, y1, x2, y2: real): real;
begin
length := sqrt(sqr(x1 - x2) + sqr(y1 - y2));
end;
function is_triangle(x1, y1, x2, y2, x3, y3: real): boolean;
var
a, b, c: real;
begin
a := length(x1, y1, x2, y2);
b := length(x1, y1, x3, y3);
c := length(x2, y2, x3, y3);
is_triangle := not ((a >= b + c) or (b >= a + c) or (c >= a + b));
end;
function volume(x1, y1, x2, y2, x3, y3: real): real;
var
a, b, c, p: real;
begin
a := length(x1, y1, x2, y2);
b := length(x1, y1, x3, y3);
c := length(x2, y2, x3, y3);
p := (a + b + c) / 2;
volume := sqrt(p * (p - a) * (p - b) * (p - c));
end;
begin
repeat
write('Введите 3 точки триугольника 1 =>');
read(x1, y1, x2, y2, x3, y3)
until is_triangle(x1, y1, x2, y2, x3, y3);
S1 := volume(x1, y1, x2, y2, x3, y3);
repeat
write('Введите 3 точки триугольника 2 =>');
read(x1, y1, x2, y2, x3, y3)
until is_triangle(x1, y1, x2, y2, x3, y3);
S2 := volume(x1, y1, x2, y2, x3, y3);
writeln(s1,' ',s2);
if S1 > S2 then writeln(1)
else if S2 > S1 then writeln(2)
else writeln(' = ');
end.