#include <bits/stdc++.h>
using namespace std;

#define fs first
#define sc second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};
const double EPS = 1e-10;

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ") 
{ rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

struct Point{
	double x, y;
	Point(){}
	Point(double x,double y) :x(x), y(y){}
	Point operator+(Point p) {return Point(x+p.x,y+p.y);}
	Point operator-(Point p) {return Point(x-p.x,y-p.y);}
	Point operator*(double k){return Point(x*k,y*k);}
	Point operator/(double k){return Point(x/k,y/k);}
	double norm(){return x*x+y*y;}
	double abs(){return sqrt(norm());}

	bool operator < (const Point &p) const{
		return x!=p.x?x<p.x:y<p.y;
	}

	bool operator == (const Point &p) const{
		return fabs(x-p.x)<EPS && fabs(y-p.y)<EPS;
	}
};

typedef Point Vector;
typedef vector<Point> Polygon;

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 contains(Polygon g,Point p){
	int n = g.size();
	bool x = false;
	for(int i = 0; i < n; i++){
		Point a = g[i] - p, b = g[(i + 1) % n] - p;
		if(fabs(cross(a, b)) < EPS && dot(a, b) < EPS) return 1;
		if(a.y > b.y) swap(a, b);
		if(a.y < EPS && EPS < b.y && cross(a,b) > EPS ) x = !x;
	}

	return (x ? 2 : 0);
}

int main() {
	Point a, r;
	Polygon v;

	while (cin >> a.x >> a.y) {
		v.clear();
		v.pb(a);
		rep(i, 2) { 
			cin >> a.x >> a.y;
			v.pb(a);
		}
		cin >> r.x >> r.y;

		cout << (contains(v, r) == 2 ? "YES" : "NO") << endl;
	}
}