#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

#include <complex>
typedef complex<double> Point;
typedef vector<Point> Polygon;


double dot(Point a, Point b){
  return real(conj(a) * b);
}
double cross(Point a, Point b){
  return imag(conj(a) * b);
}

Point curr(const Polygon& a, int x){ return a[x]; }
Point next(const Polygon& a, int x){ return a[(x + 1) % a.size()]; }

int sign(double x){
  if(x > EPS) return 1;
  if(x < -EPS) return -1;
  return 0;
}

enum{OUT, ON, IN};
int contains(const Polygon& P, const Point& p){
  bool in = false;
  REP(i, P.size()){
    Point a = curr(P, i) - p;
    Point b = next(P, i) - p;
    if(a.imag() > b.imag()) swap(a, b);
    if(a.imag() <= 0 && 0 < b.imag() && sign(cross(a, b)) < 0){
      in = !in;
    }
    if(cross(a, b) == 0 && dot(a, b) <= 0) return ON;
  }
  return in ? IN : OUT;
}

int main(){
  while(true){
    Polygon P(3);
    REP(i, 3) cin >> P[i].real() >> P[i].imag();
    Point p;
    cin >> p.real() >> p.imag();
    p.imag() -= EPS / 2;
    if(cin.eof()) break;
    if(contains(P, p) == IN) cout << "YES" << endl;
    else if(contains(P, p) == OUT) cout << "NO" << endl;
    else if(contains(P, p) == ON) assert(false);
  }
  return 0;
}