#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-rx)*(px-qx)+(qy-ry)*(py-qy)<=0&&(rx-sx)*(px-rx)+(ry-sy)*(py-ry)<=0&&(sx-qx)*(px-sx)+(sy-qy)*(py-sy)<=0)||
     ((qx-rx)*(px-qx)+(qy-ry)*(py-qy)>=0&&(rx-sx)*(px-rx)+(ry-sy)*(py-ry)>=0&&(sx-qx)*(px-sx)+(sy-qy)*(py-sy)>=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;
}