#include <iostream>
using namespace std;

class Point {
public:
  double x, y;
  Point(double x=0, double y=0) : x(x), y(y) {}
  Point operator -(Point p) {
    return Point(x-p.x, y-p.y);
  }
};
typedef Point Vector;

double cross(Vector a, Vector b) {
  return a.x*b.y - a.y*b.x;
}
Point p[3];
Point q;

bool solve() {
  int dir;
  double tmp;
  for(int i = 0; i < 3; i++) {
    int a = i;
    int b = (i+1)%3;

    tmp = cross(p[b]-p[a], q-p[a]);
    if(i == 0) {
      if(tmp > 0) dir = 1;
      else        dir = -1;
    } else {
      switch(dir) {
      case 1:
	if(!(tmp > 0)) return false;
	break;
      case -1:
	if(!(tmp < 0)) return false;
	break;
      }
    }
  }
  return true;
}

int main() {
  bool loop = true;
  while(1) {
    for(int i = 0; i < 3; i++) {
      cin >> p[i].x >> p[i].y;
      if(cin.eof()) {
	loop = false;
	break;
      }
    }
    if(!loop) break;
    cin >> q.x >> q.y;

    if(solve()) cout << "YES" << endl;
    else        cout << "NO" << endl;
  }
  return 0;
}