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

double eps = 1e-10;

class Point {
public:
	double x, y;
	
	Point(double x = 0, double y = 0) : x(x), y(y) {}
	
	Point operator + (const Point& p) {
		return Point(x + p.x, y + p.y);
	}
	Point operator - (const Point& p) {
		return Point(x - p.x, y - p.y);
	}
	Point operator * (const double& a) {
		return Point(x * a, y * a);
	}
	Point operator / (const double& a) {
		return Point(x / a, y / a);
	}
	
	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;
	}
	
	double abs() {
		return sqrt(norm());
	}
	double norm() {
		return x * x + y * y;
	}
	
};

typedef Point Vector;

bool equals(const double& a, const double& b) {
	return fabs(a - b) < eps;
}

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

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

int main() {
	double x1, x2, x3, y1, y2, y3, px, py;
	while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> px >> py){
		Vector va = Vector(x2 - x1, y2 - y1);
		Vector vb = Vector(x3 - x2, y3 - y2);
		Vector vc = Vector(x1 - x3, y1 - y3);
		Vector v1 = Vector(px - x1, py - y1);
		Vector v2 = Vector(px - x2, py - y2);
		Vector v3 = Vector(px - x3, py - y3);
		double c1 = cross(va, v2);
		double c2 = cross(vb, v3);
		double c3 = cross(vc, v1);
		if((c1 > eps && c2 > eps && c3 > eps) || (c1 < eps && c2 < eps && c3 < eps))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		
	}
	return 0;
}