2066Triangle

2066   Triangle

题目描述

Given the coordinates of the vertices of a triangleAnd a point. You just need to judge whether the point is in the Triangle.

输入格式:

The input contains several test cases. For each test case, only line contains eight integer numbers , describing the coordinates of the triangle and the point. All the integer is in range of [-100  , 100].

The end of the input is indicated by a line containing eight zeros separated by spaces.

输出格式:

For each test case ,if the point is inside of the triangle,please output the string ”YES”,else output the string “NO”. You just need to follow the following examples.

输入样例 复制
0 0 4 0 0 4 3 1
0 0 4 0 0 4 1 2
0 0 4 0 0 4 -1 -1
0 0 0 0 0 0 0 0
输出样例 复制
NO
YES
NO

说明

1
2
通过提交
时空限制1000ms/128mb
题目来源
评测方式在线评测
题目类型
难        度