#include <iostream>
#include <vector>
#include <sstream>
//#include <fstream>
#include <complex>

using namespace std;

typedef complex<double> P;

#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)

// OÏ (cross product) : a~b = |a||b|sinÆ
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}

int main()
{
//	cut here before submit 
//	freopen("testcase.pt", "r", stdin);
	string str = "";

	while (getline (cin, str )){
		double x1, y1, x2, y2, x3, y3, xp, yp;
		stringstream ss (str );

		ss >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp;
		P a(x1, y1), b(x2, y2), c(x3, y3 ), p(xp, yp);
		P Vab = b - a, Vbc = c - b, Vca = a - c;
		P Vap = p - a, Vbp = p - b, Vcp = p - c;
		
		if ( (cross (Vab, Vap ) > 0. && cross (Vbc, Vbp ) > 0. && cross (Vca, Vcp ) > 0.)
		||   (cross (Vab, Vap ) < 0. && cross (Vbc, Vbp ) < 0. && cross (Vca, Vcp ) < 0.) ) {
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end loop

	return 0;
}