#include <iostream>
#include <vector>

using namespace std;

double crossProduct(double px, double py, double x1, double y1, double x2, double y2) {
  double v1[2] = {px - x1, py - y1};
  double v2[2] = {x2 - x1, y2 - y1};
  return v1[0] * v2[1] - v1[1] * v2[0];
}

int main() {
	double x1, x2, x3, xp, y1, y2, y3, yp;
  double t[3];
  int f;
	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
    t[0] = crossProduct(xp, yp, x1, y1, x2, y2);
    t[1] = crossProduct(xp, yp, x2, y2, x3, y3);
    t[2] = crossProduct(xp, yp, x3, y3, x1, y1);
    for (int i = f = 0; i < 3; i++) {
      if (t[i] < 0) f++;
      else if (t[i] > 0) f--;
      else return -1;
    }
    if (f == 3 || f == -3) cout << "YES\n";
    else cout << "NO\n";
	}
	return 0;
}