var
x1, x2, x3, x, y1, y2, y3, y, A, B, U: integer;
begin
U = (x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3);
if U = 0 then
writeln('С треугольником что-то не так...')
else
begin
A := (x - x3) * (y2 - y3) - (x2 - x3) * (y - y3);
B := (x1 - x3) * (y - y3) - (x - x3) * (y1 - y3);
if (U < 0) and (U <= A) and (A <= 0) and (U <= B) and (B <= 0) or
(U > 0) and (U >= A) and (A >= 0) and (U >= B) and (B >= 0) then
writeln('Внутри треугольника')
else
writeln('Снаружи')
end
end.