bool func (double x1, double y1, double x2, double y2, double x3, double y3, double x, double y) {
return (((x - x1)*(y2 - y1) - (y - y1)*(x2 - x1))*((x3 - x1)*(y2 - y1) - (y3 - y1)*(x2 - x1)) >= 0) &&
(((x - x2)*(y3 - y2) - (y - y2)*(x3 - x2))*((x1 - x2)*(y3 - y2) - (y1 - y2)*(x3 - x2)) >= 0) &&
(((x - x3)*(y1 - y3) - (y - y3)*(x1 - x3))*((x2 - x3)*(y1 - y3) - (y2 - y3)*(x1 - x3)) >= 0)
}