#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_DEPRECATE

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <fstream>


using namespace std;
const int MOD = 1000000009; // check!!!
const int INF = 100000000; //1e8

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;

#define FOR(i,n) for(int i = 0; i < (n); i++)
#define sz(c) ((int)(c).size())
#define ten(x) ((int)1e##x)
#define tenll(x) ((ll)1e##x)


const double EPS (1e-8);
const double PI=acos(-1.0);

template<class T>
struct point{
    T x,y;
    point() : x(0), y(0) {}
    point(const T& x,const T& y) : x(x), y(y) {}
    point operator+(const point &a)const{ return point(x+a.x,y+a.y); }
    point& operator+=(const point &a){x += a.x; y += a.y; return *this;}
    point operator-(const point &a)const{ return point(x-a.x,y-a.y); }
    point& operator-=(const point &a){x -= a.x; y -= a.y; return *this;}
    point operator*(const double a)const{ return point(a*x,a*y); }
    point& operator*=(const double a){ x *= a; y *= a; return *this;}
    point operator/(const double a)const{ return point(x/a,y/a); }
    point& operator/=(const double a){ x /= a; y /= a; return *this;}
	
	//テヲツッツ氾ィツシツεァツ板ィ
	bool operator<(const point &a)const{return (x != a.x) ? (x < a.x) : (y < a.y);}
 
};

template<class T> T SQ(T x){ return x*x; }
template<class T> T dist2(const point<T> &a,const point<T> &b){return SQ(a.x-b.x)+SQ(a.y-b.y);}
template<class T> T abs2(const point<T>& p){return SQ(p.x) + SQ(p.y);}
template<class T> T abs(const point<T>& p){return sqrt(abs2(p));}
template<class T> T dot(const point<T>& a,const point<T>& b)
{return a.x*b.x + a.y*b.y;}
template<class T> T cross(const point<T>& a,const point<T>& b)
{return a.x*b.y - a.y*b.x;}
template<class T> point<T> rot(const point<T>& a,const double theta){
        return point<T>(a.x*cos(theta)-a.y*sin(theta),
			a.x*sin(theta)+a.y*cos(theta));
}
template<class T>
double arg(const point<T> &a){	double t=atan2(a.y,a.x); return t<0?t+2*PI:t; }

enum{CCW=1,CW=-1,ON=0};
template<class T>
int ccw(const point<T> &a,point<T> b,point<T> c){
	b -= a; c -= a;
    double rdir=cross(b,c);
    double len = abs(b) * abs(c); //ティツェツ、テ・ツキツョテ・ツッツセテァツュツ?(テゥツ?淌・ツコツヲテ」ツ?古」ツつ?」ツ?ーテ」ツ??ヲツ卍づ」ツ?ッテ・ツ、ツ姪」ツ?凖」ツ?凝」ツ??、ツコツ古、ツケツ療」ツ?ォテァツスツョテ」ツ?催ヲツ渉崚」ツ?暗」ツつ?
    if(rdir> EPS * len) return CCW; //cテ」ツ?径bテ」ツつ暗」ツつ甘、ツクツ?テ・ツ渉催ヲツ卍づィツィツ暗・ツ堕ィテ」ツつ?
    if(rdir<-EPS * len) return CW; // cテ」ツ?径bテ」ツつ暗」ツつ甘、ツクツ?テヲツ卍づィツィツ暗・ツ堕ィテ」ツつ?
    return ON; // a,b,cテ」ツ?古、ツクツ?ァツ崢エテァツキツ堙、ツクツ?
}

//テ・ツ、ツ堙ィツァツ津・ツスツ「テ」ツ?ョテゥツ敖「テァツゥツ?
template<class T>
T area(const vector<point<T> >& v){
	T ans = 0;
	for (int i = 2; i < (int)v.size(); i++){
		ans += cross(v[i-1] - v[0],v[i] - v[0]);
	}
	return abs(ans) / 2;
}

typedef point<double> P;

double ar(P& a,P& b,P& c){
	vector<P> v;
	v.push_back(a);
	v.push_back(b);
	v.push_back(c);
	return area(v);
}

template<class T>
std::istream& operator>>(std::istream& is, point<T>& point){return ( is >> point.x >> point.y );}


int main(){
	P p[4];
	while(true){
		p[0].x = INF;
		FOR(i,4) cin>>p[i];
		if(p[0].x == INF) break;

		if(ar(p[0],p[1],p[2]) + EPS >= ar(p[0],p[1],p[3]) + ar(p[0],p[2],p[3]) + ar(p[1],p[2],p[3])){
			puts("YES");
		} else {
			puts("NO");
		}

	}

	return 0;
}

Measured memory_bytes: 1188