#include<algorithm>
#include<iostream>
#include<string>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
bool pt(double px,double py,double qx,double qy,double rx,double ry,double sx,double sy){
  if(((qx-px)*(rx-px)+(qy-py)*(ry-py)<=0&&(rx-px)*(sx-px)+(ry-py)*(sy-py)<=0&&(sx-px)*(qx-px)+(sy-py)*(qy-py)<=0)||
     ((qx-px)*(rx-px)+(qy-py)*(ry-py)>=0&&(rx-px)*(sx-px)+(ry-py)*(sy-py)>=0&&(sx-px)*(qx-px)+(sy-py)*(qy-py)>=0))
    return 1;
  else
    return 0;
}
int main(){
  double px,py,qx,qy,rx,ry,sx,sy;
  while(cin>>qx>>qy>>rx>>ry>>sx>>sy>>px>>py){
    if(pt(px,py,qx,qy,rx,ry,sx,sy))
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }
  return 0;
}