#include <iostream>
#include <cmath>

using namespace std;

int main() {
	int x1, x2, x3, y1, y2, y3, xp ,yp;
	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
		int ab = (y2-y1)/(x2-x1)*(xp-x1)+y1-yp;
		int bc = (y3-y2)/(x3-x2)*(xp-x2)+y2-yp;
		int ca = (y1-y3)/(x1-x3)*(xp-x3)+y3-yp;
		if (ab < 0 && bc < 0 && ca > 0) {
			cout << "YES" << endl;
		} else if (ab < 0 && bc > 0 && ca < 0) {
			cout << "YES" << endl;
		} else if (ab > 0 && bc < 0 && ca < 0) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}