#include <iostream>

using namespace std;

int islineCross(double x1, double y1, double x2, double y2, double c1, double c2, double d1, double d2) {
  if (((c2-y1)*(x1-x2)-(c1-x1)*(y1-y2))*((d2-y1)*(x1-x2)-(d1-x1)*(y1-y2)) > 0)
    return -1;
  else
    return 0;
}

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

  while((cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp)) {
    int CrossCount = 0;
    if (islineCross(x1,y1,x2,y2,xp,yp,xp+1,yp) == 0)
      CrossCount++; 
    if (islineCross(x2,y2,x3,y3,xp,yp,xp+1,yp) == 0)
      CrossCount++; 
    if (islineCross(x3,y3,x1,y1,xp,yp,xp+1,yp) == 0)
      CrossCount++; 
    
    if (CrossCount%2 == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  } 

  return 0;
}