int fun(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
if((x3-x1)*(y2-y1) == (y3-y1)*(x2-x1)) return -1;
if(((x4-x1)*(y2-y1)-(y4-y1)*(x2-x1))*((x3-x1)*(y2-y1)-(y3-y1)*(x2-x1)) <= 0) return -2;
if(((x4-x1)*(y3-y1)-(y4-y1)*(x3-x1))*((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)) <= 0) return -2;
if(((x4-x2)*(y3-y2)-(y4-y2)*(x3-x2))*((x1-x2)*(y3-y2)-(y1-y2)*(x3-x2)) <= 0) return -2;
return 0;
}
int main()
{
int result;
result = fun(0, 1, 2, 3, 4, 2, 4, 3);
if(result == -1) printf("the first 3 points can not generate a triangle\n");
else if(result == -2) printf("the 4th point is not in the triangle which generated by the first 3 points\n");
else printf("the 4th point is in the triangle which generated by the first 3 points\n");
return 0;
}