#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
double hoge(double x1,double y1,double x2, double y2){
  double a,b,c;
  a=max(x1,x2)-min(x1,x2);
  b=max(y1,y2)-min(y1,y2);
  c=(a*a)+(b*b);
  c=sqrt(c);
  return c;
}
double heron(double a,double b,double c){
  double s,S;
  s=(a+b+c)/2;
  S=s*(s-a)*(s-b)*(s-c);
  S=sqrt(S);
  return S;
}
int main(void){
  double x1,x2,x3,y1,y2,y3,xp,yp,ab,bc,ac,ap,bp,cp,abc,apb,bpc,apc,sum;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
    ab=hoge(x1,y1,x2,y2);
    bc=hoge(x2,y2,x3,y3);
    ac=hoge(x1,y1,x3,y3);
    ap=hoge(x1,y1,xp,yp);
    bp=hoge(x2,y2,xp,yp);
    cp=hoge(x3,y3,xp,yp);
    abc=heron(ab,bc,ac);
    apb=heron(ap,bp,ab);
    bpc=heron(bp,cp,bc);
    apc=heron(ap,cp,ac);
    sum=apb+bpc+apc;
    if(max(abc,sum)-min(abc,sum)<=0.000000001) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}
