#include <iostream>
using namespace std;

int main() {
  double x1,y1,x2,y2,x3,y3,xp,yp;
  double a[2],b[2];
  double A,B;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
    a[0] = x2 - x1;
    a[1] = y2- y1;
    b[0] = x3 - x1;
    b[1] = y3 - y1;
    if(a[0] * b[1] -b[0] * a[1] != 0) {
      A = ( xp * b[1] - b[0] * yp) / (a[0] * b[1] - b[0] * a[1]);
      B = (a[0] * yp - xp * a[1]) / (a[0] * b[1] - b[0] * a[1]);
      if ((A+B < 1) && (A > 0) && (B > 0)) {
        cout << "YES" << endl;
      }
      else {
        cout << "NO" << endl;
      }
    }
    else
      cout << "NO" << endl;
  }
}