#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>
#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
using namespace std;
 
double EPS = 1e-10;
 
double add(double a, double b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}
 
struct point{
  double x, y;
  point(){}
  point(double x,double y) : x(x) , y(y){}
  point operator + (point p){return point(add(x,p.x), add(y,p.y));}
  point operator - (point p){return point(add(x,-p.x), add(y,-p.y));}
};
 
double dot(point a, point b){return a.x*b.x+a.y*b.y;}
double cross(point a, point b){return a.x*b.y-a.y*b.x;}
 
int is_point_on_line(point a, point b, point c) {
  return cross(b-a,c-a)==0.0 && dot(b-a,c-a)>-EPS && dot(a-b,c-b)>-EPS;
}
 
int is_intersected_ls(point a1, point a2, point b1, point b2) {
  if(cross(a1-a2,b1-b2)==0){
    return is_point_on_line(a1,a2,b1) || is_point_on_line(a1,a2,b2) 
        || is_point_on_line(b1,b2,a1) || is_point_on_line(b1,b2,a2);
  }
  else {
    return (cross(a2-a1, b1-a1)*cross(a2-a1, b2-a1)<EPS ) &&
           (cross(b2-b1, a1-b1)*cross(b2-b1, a2-b1)<EPS );
  }
}
 
int contain(point p, vector<point> ps){
  point a=p,b(1000000,p.y);
 
  double ymx=-DBL_MAX,ymn=DBL_MAX;
  for(int i=0;i<ps.size();i++){
    ymx=max(ymx,ps[i].y);
    ymn=min(ymn,ps[i].y);
  }
  if(a.y<=ymn||a.y>=ymx)return 0;
 
  int cnt=0,cnt1=0;
  for(int i=0;i<ps.size();i++)
    if(is_point_on_line(a,b,ps[i]))cnt1++;
   
  for(int i=0;i<ps.size();i++)
    if(is_intersected_ls(ps[i],next(ps,i),a,b))cnt++;
  
  return (cnt-cnt1)%2;
}
 
 
int main(void){
  
  point in[4],p;
 
  while(true){
    vector<point>ps(3);
 
    for(int i=0;i<3;i++)
      if(!(cin >> ps[i].x >> ps[i].y))return 0;
 
    cin >> p.x >> p.y;
     
    if(contain(p,ps))cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}