#include<iostream>
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y;
  double s,t;

  while(cin>>a>>b>>c>>d>>e>>f>>x>>y){
    s=((e-d)*(x-c)-(e-c)*(y-d))/((a-c)*(e-d)-(e-c)*(b-d));
    t=((a-c)*(y-d)-(b-d)*(x-c))/((a-c)*(e-d)-(e-c)*(b-d));

    if(0<s+t&&s+t<1){
      cout<<"YES"<<endl;
    }
    else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}