#include<iostream>
#include<vector>
using namespace std;
struct Point { long double px, py; };
Point Minus(Point p1, Point p2) {
	Point p3;
	p3.px = p1.px - p2.px;
	p3.py = p1.py - p2.py;
	return p3;
}
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
int ccw(Point p0, Point p1, Point p2) {
	Point a = Minus(p1, p0), b = Minus(p2, p0);
	if (crs(a, b) > 1e-10) return 1;
	if (crs(a, b) < -1e-10) return -1;
	if (dot(a, b) < -1e-10) return 2;
	if (norm(a) < norm(b)) return -2;
	return 0;
}
bool is_convex(vector<Point> v) {
	if (v.size() < 3) return false;
	int s = -3;
	for (int i = 0; i < v.size(); i++) {
		int r = ccw(v[i], v[(i + v.size() - 1) % v.size()], v[(i + 1) % v.size()]);
		if (abs(r) == 1 && s == -3) s = r;
		if (s * r == -1) return false;
	}
	return true;
}
int main() {
	vector<Point>V; Point C;
	while (cin >> C.px >> C.py) {
		V.push_back(C);
		for (int i = 0; i < 3; i++) {
			cin >> C.px >> C.py;
			V.push_back(C);
		}
		bool G = is_convex(V);
		if (G == true)cout << "YES" << endl;
		if (G == false)cout << "NO" << endl;
	}
	return 0;
}