#include <iostream>

using namespace std;

/*??\??????????????°??????????????????????£?????????°????????¨??????*/
/*???????????¨??????????????????????????§???????????§?????????????£??????????*/
class Vector2D {
  private:
    double x;
    double y;
  public:
    Vector2D(double _x, double _y) {
      x = _x;
      y = _y;
    }
    double operator * (Vector2D vec2) {
      return this->x*vec2.y-this->y*vec2.x;
    }
};

int main() {
  double x1,x2,x3,y1,y2,y3,xp,yp;

  while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
    Vector2D vec_12(x2-x1,y2-y1);
    Vector2D vec_2p(xp-x2,yp-y2);
    
    Vector2D vec_23(x3-x2,y3-y2);
    Vector2D vec_3p(xp-x3,yp-y3);

    Vector2D vec_31(x1-x3,y1-y3);
    Vector2D vec_1p(xp-x1,yp-y1);

    double crossproduct1 = vec_12*vec_2p;
    double crossproduct2 = vec_23*vec_3p;
    double crossproduct3 = vec_31*vec_1p;

    if ((crossproduct1 > 0 && crossproduct2 > 0 && crossproduct3 > 0) ||
        (crossproduct1 < 0 && crossproduct2 < 0 && crossproduct3 < 0))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}