#include <iostream>
#include <vector>

using namespace std;

bool checker(double a, double b,double x, double y, double px, double py);

double calc_slope(double x1, double y1, double x2, double y2);

int main(){
  double x1,y1,x2,y2,x3,y3,xp,yp;
  bool flag = true;
  string s="";
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){

    double a1, a2, a3, b1, b2, b3;

    a1 = calc_slope(x1,y1,x2,y2);
    b1 = -a1*x1+y1;
    flag &= checker(a1,b1,x3,y3,xp,yp);

    a2 = calc_slope(x2,y2,x3,y3);
    b2 = -a2*x2+y2;
    flag &= checker(a2,b2,x1,y1,xp,yp);

    a3 = calc_slope(x3,y3,x1,y1);
    b3 = -a3*x3+y3;
    flag &= checker(a3,b3,x2,y2,xp,yp);

    if(flag){
      s += "YES\n";
    }else{
      s += "NO\n";
    }
  }
  cout << s;
}

bool checker(double a, double b, double ox, double oy, double px, double py){ 
  if(a == 0){
    if(b <= ox && b <= px){
      return true;
    }
    else if(b > ox && b > px){
      return true;
    }
  }

  if(oy <= a*ox+b && py <= a*px+b){
    return true;
  }
  else if(oy > a*ox+b && py > a*px+b){
    return true;
  }
  else{
    return false;
  }
}

double calc_slope(double x1, double y1, double x2, double y2){
  if(x1 > x2){
    return (y1-y2)/(x1-x2);
  }else if(x1 < x2){
    return (y2-y1)/(x2-x1);
  }else{
    return 0;
  }
}