#include <iostream>
#include <cmath>
using namespace std;

#define double long double

double T(double a[3]) {
	double res, sum;
	res = a[0] + a[1] + a[2];
	sum = res;
	for(int i = 0; i < 3; i++) {
		res *= sum - 2.0 * a[i];
	}
	return sqrt(res);
}

double dist(double ax, double ay, double bx, double by) {
	return sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
}

int main() {
	while(1) {
		bool exit = false;
		double x[4], y[4];
		double d0[3], d1[3];
		for(int i = 0; i < 4; i++) {
			if(!(cin >> x[i] >> y[i]))
				exit = true;
		}
		if(exit)
			break;
		for(int i = 0; i < 3; i++) {
			d0[i] = dist(x[i], y[i], x[(i+1)%3], y[(i+1)%3]);
			d1[i] = dist(x[i], y[i], x[3], y[3]);
		}
		bool flg = true;
		double S0, S1;
		S0 = T(d0); S1 = 0;
		for(int i = 0; i < 3; i++) {
			double res;
			double tmp[3] = {d0[i], d1[i], d1[(i+1)%3]};
			/*
			   for(int i = 0; i < 3; i++)
			   cout << tmp[i] << " ";
			   cout << endl;
			   */
			res = T(tmp);
			if(res < 1e-16)
				flg = false;
			S1 += res;
		}
		//cout << S1 - S0 << endl;
		if(flg && fabs(S1 - S0) < 1e-16)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}