#include "bits/stdc++.h"
#include <cassert>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999
//#define INF (1LL<<59)



#define EPS (1e-10)
class P{                    //???
public:
    double x,y;
    
    P(double _x=0,double _y=0):x(_x),y(_y){};
    P operator + (P &p     ){ return P( x+p.x , y+p.y ); }  //??????
    P operator - (P &p     ){ return P( x-p.x , y-p.y ); }  //??????
    P operator * (double k ){ return P( x*k   , y*k    ); } //??????
    P operator / (double k ){ return P( x/k   , y/k    ); } //??????
    
    bool operator == (const P &p){ return ( fabs(x-p.x)<EPS && fabs(y-p.y)<EPS ); }
    //    bool operator < (const P &p)const{ return ( x!=p.x ? x<p.x:y<p.y ); }
    
    double norm(){ return x*x+y*y; }        //?????????
    double abs() { return sqrt(norm()); }   //??§??????
    
};
struct L{P p1,p2;};         //??´???
typedef vector<P> Polygon;  //????§???¢
typedef P Vector;           //????????????

double dot  (Vector a,Vector b){ return a.x*b.x+a.y*b.y; }
double cross(Vector a,Vector b){ return a.x*b.y-a.y*b.x; }

int ccw(P p0,P p1,P p2){    //AOJ_BOOK_P386 verified
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    
    if( cross(a,b) > EPS  ) return 1 ;      //COUNTER_CLOCKWISE
    if( cross(a,b) < -EPS ) return -1;      //CLOCKWISE
    if( dot(a,b)   < -EPS ) return 2;       //ONLINE_BACK
    if( a.norm()   < b.norm() ) return -2;  //ONLINE_FRONT
    
    return 0;                               //ON_SEGMENT;
}

//?????????????????? verified
bool intersect(P p1,P p2,P p3,P p4){ return ( ccw(p1,p2,p3)*ccw(p1,p2,p4)<=0 && ccw(p3,p4,p1)*ccw(p3,p4,p2)<=0 ); }

//????????¨???????????¢ verified ARC042-B
double distance_l_p(L l, P p) { return abs(cross(l.p2-l.p1, p-l.p1)) /(l.p2-l.p1).abs(); }

//????????¨??????????????????(????????£???????????´??????????????±???)
bool intersect_circle_point(P center, double r, L line){
    if( distance_l_p(line,center) <= r+EPS ) return true;
    return false;
}


//????´?????§???¢??????
bool isSimple( Polygon pol ){
    //???????????????????????????pol?????\????????????
    size_t pol_size = pol.size()-1;
    rep(i,pol_size){
        for(int j=i+2;j<pol_size;j++){
            if( i==j || i==(j-1+pol_size)%pol_size || i==(j+1+pol_size)%pol_size )continue;
            if( intersect(pol[i], pol[i+1], pol[j], pol[j+1]) )return false;
        }
    }
    return true;
}


//??????????§???¢????????´?????????????????????????±???????
int isPointInsidePolygon(vector<L> side,P point){
    long sideSum=side.size();
    int count=0;
    
    for(int i=0;i<sideSum;i++){

        double result = cross(side[i].p2-side[i].p1,point-side[i].p1);
        
        
        if(result>0)count++;
        
    }
    if(count%sideSum==0)return 1;    //???????????´?????????
    else return 0;
    
}


int main(){
    double a,b,c,d,e,f,g,h;
    while(cin>>a>>b>>c>>d>>e>>f>>g>>h){
        vector<L> angle;
        angle.pb( L{P(a,b),P(c,d)} );
        angle.pb( L{P(c,d),P(e,f)} );
        angle.pb( L{P(e,f),P(a,b)} );
        
        if(isPointInsidePolygon(angle,P(g,h))){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;
    }
    
    
    return 0;
}

Measured memory_bytes: 3068