#include <iostream>
using namespace std;

class Point{
    public:
    double x;
    double y;
};

 double vecProduct(Point p1, Point p2, Point p3)
{
    return ((p1.x - p3.x)*(p2.y - p3.y) - (p2.x - p3.x)*(p1.y - p3.y));
}
    
bool isPointInTriangle(Point pt, Point v1, Point v2, Point v3)
{
    
    bool r1 = vecProduct(pt,v1,v2) < 0.0;
    bool r2 = vecProduct(pt,v2,v3) < 0.0;
    bool r3 = vecProduct(pt,v3,v1) < 0.0;
    
    return ((r1 == r2) && (r2 == r3));
}

int main(void){
   Point p1,p2,p3,pt;
   
   while(cin>>p1.x>>p1.y>>p2.x>>p2.y>>p3.x>>p3.y>>pt.x>>pt.y)
   {
        if(isPointInTriangle(pt,p1,p2,p3))
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
   }
}
