#include<iostream>
using namespace std;

bool point(double x1, double y1, double x2, double y2, double x3, double y3, double px, double py){
	double a1 = (x2 != x1) ? (y2 - y1) / (x2 - x1) : 10000000 * (((y2 - y1) < 0) * 2 - 1 );
	double a2 = (x3 != x1) ? (y3 - y1) / (x3 - x1) : 10000000 * (((y3 - y1) < 0) * 2 - 1 );
	double ap = (px != x1) ? (py - y1) / (px - x1) : 10000000 * (((py - y1) < 0) * 2 - 1 );
	
	if (a1>0 && a2 > 0 && ap > 0 || a1<0 && a2<0 && ap<0){
		if (a1>ap && a2 < ap || a1<ap && a2>ap)return true;
		return false;
	}
	else{
		if (1000000>ap && ap>a1 && -1000000 < ap && ap < a2 || 1000000 > ap && ap > a2 && -1000000 < ap && ap < a1)return true;
		return false;
	}
}

int main(){
	double x1, y1, x2, y2, x3, y3, px, py;

	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> px >> py)
		std::cout << ((point(x1, y1, x2, y2, x3, y3, px, py) && point(x2, y2, x3, y3, x1, y1, px, py)) ? "YES" : "NO") << std::endl;

	return 0;
}