#include<iostream>
#include<cmath>

using namespace std;

struct Point{
  double x, y;
  Point(){ x = 0; y = 0; }
  Point(double x_, double y_){ x = x_; y = y_; }
};

struct Segment{
  Point a, b;
  Segment(): a(), b(){}
  Segment(Point a_, Point b_){ a = a_; b = b_; }
};

static double ER = 1.0e-8;

bool isZero(double x){
  return (abs(x) < ER);
}

bool isEqual(double x, double y){
  return isZero(x - y);
}

int isIntersection_ss(const Segment& ab, const Segment& cd){
  double m = (ab.b.x - ab.a.x)*(cd.b.y - cd.a.y)
    - (ab.b.y - ab.a.y)*(cd.b.x - cd.a.x);
  if(isZero(m)) return false;
  double r = ((cd.a.x - ab.a.x)*(cd.b.y - cd.a.y)
              - (cd.a.y - ab.a.y)*(cd.b.x - cd.a.x)) / m;
  double s = ((cd.a.x - ab.a.x)*(ab.b.y - ab.a.y)
              - (cd.a.y - ab.a.y)*(ab.b.x - ab.a.x)) / m;
  if(r < 0 || r > 1 || s < 0 || s > 1)  return true;
  return false;
}

bool isPointInnerTriangle(const Point& a, const Point& b,
			  const Point& c, const Point& p){
  if(isEqual((a.x - c.x)*(a.y - b.y), (a.x - b.x)*(a.y - c.y))) return false;
  return isIntersection_ss(Segment(a, b), Segment(c, p)) &&
    isIntersection_ss(Segment(b, c), Segment(a, p)) &&
    isIntersection_ss(Segment(c, a), Segment(b, p));
}

int main(){
  Point a, b, c, p;
  while(cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> p.x >> p.y){
    if(isPointInnerTriangle(a, b, c, p)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}