#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
typedef complex<double>P;
double dot(P a, P b){ return real(conj(a)*b);}
double cross(P a,P b){return imag(conj(a)*b);}
struct L: public vector<P>{
    L(const P &a,const P &b){
        push_back(a); push_back(b);
    }// line
};
struct C{
    P c; double r;
    C(const P &c, double r) : c(c),r(r){}    // circle
};
/*complex ?????????*/
namespace std {
    bool operator < (const P& a, const P& b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
        //return imag(a) != imag(b) ? imag(a) < imag(b) : real(a) < real(b);
    }
    bool operator == (const P& a, const P& b) {
        return a.real()==b.real()&&a.imag()==b.imag();
    }
}
/*????¨?????????????????¨???????????????????*/
int ccw(P a, P b, P c) {
    b -= a; c -= a;
    if (cross(b, c) > 0)   return +1;       // counter clockwise
    if (cross(b, c) < 0)   return -1;       // clockwise
    if (dot(b, c) < 0)     return +2;       // c--a--b on line
    if (norm(b) < norm(c)) return -2;       // a--b--c on line
    return 0;
}
int main(){
    vector<P>v(4);vector<pdd>p(3);
    vector<double>t(3,0);
    pdd temp;
    while(cin>>p[0].first>>p[0].second>>p[1].first>>p[1].second>>p[2].first>>p[2].second>>temp.first>>temp.second){
        rep(i,3)v[i]=P(p[i].first,p[i].second);
        P pit=P(temp.first,temp.second); v[3]=v[0];
        bool flag=true;P hoge;
        rep(i,3)t[i]=cross((-v[i]+v[i+1]),-v[i+1]+pit);
        if((t[0]>0&&t[1]>0&&t[2]>0)||(t[0]<0&&t[1]<0&&t[2]<0))puts("YES");
        else puts("NO");
    }
}