#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

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

	while (getline (cin, str )){
		int i;
		vector <double> tpx (3, 0.);
		vector <double> tpy (3, 0.);
		double px = 0.;
		double py = 0.;
	
		stringstream ss(str);
		double minX = DBL_MAX; double maxX = DBL_MIN;
		double minY = DBL_MAX; double maxY = DBL_MIN;
		for (i = 0; i < 3; ++i){
			double tx,ty;
			ss >> tx >> ty;
			tpx[i] = tx; tpy[i] = ty;
			minX = min (minX, tx); maxX = max (maxX, tx);
			minY = min (minY, ty); maxY = max (maxY, ty);
		} // end for
		ss >> px >> py;

		if (px < minX || px > maxX || py < minY || py > maxY){
			cout << "NO" << endl;
			return 0;
		} // end if
		 
		vector <double> a(3, 0.);
		vector <double> b(3, 0.);
		vector <double> c(3, 0.);
/*
		for (i = 0; i < 3; ++i){
			cout << "tp[" << i << "]: ";
			cout << '(' << tpx[i] << ',' << tpy[i] << ')' << endl;
		} // end for
		cout << "p: ";
		cout << '(' << px << ',' << py << ')' << endl;
*/
		int j;
		for (i = 0; i < 3; ++i){
			j = (i + 1) % 3;
			if (tpx[i] == tpx[j]){
				a[i] = 1.0;
				b[i] = 0.0;
				c[i] = -a[i]*tpx[i] - b[i]*tpy[i];
			}else if (tpy[i] == tpy[j]){
				a[i] = 0.0;
				b[i] = 1.0;
				c[i] = -a[i]*tpx[i] - b[i]*tpy[i];
			}else{
				a[i] = (tpy[j] - tpy[i]);
				b[i] = -(tpx[j] - tpx[i]);
 				c[i] = -a[i]*tpx[i] - b[i]*tpy[i];
			} // end if
//			cout << a[i] << ' ' << b[i] << ' ' << c[i] << endl;
		} // end for
		vector <int> d(3, 0);

		for (i = 0; i < 3; ++i){
			if (a[i] != 0.0 && b[i] != 0.0){
				if ( py > (-a[i]*px - c[i])/b[i] ){
					d[i] = 1;
				}else if ( py < (-a[i]*px - c[i])/b[i] ){
					d[i] = -1;
				} // end if
			}else if (a[i] == 0.0){
				if ( py > -c[i] ){
					d[i] = 1;
				}else if ( py < -c[i] ){
					d[i] = -1;
				} // end if
			}else if (b[i] == 0.0){
				if ( px > -c[i] ){
					d[i] = 1;
				}else if ( px < -c[i] ){
					d[i] = -1;
				} // end if
			} // end if
//			cout << "d[" << i << "]: " << d[i] << endl;
		} // end for
		if ( (d[0] < 0 || d[1] < 0 || d[2] < 0 ) && d[0]*d[1]*d[2] > 0){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if 
	
	} // end for
		
	return 0;
}