#include <bits/stdc++.h>
using namespace std;

#define REP(i, s, e) for(int i = (int)(s); i < (int)(e); ++i)
#define rep(i, n) REP(i, 0, n)

#define X real()
#define Y imag()

using D = double;
using P = complex<D>;

const D EPS = 1e-10;
namespace std {
  bool operator < (const P& a, const P& b) {
    return a.X != b.X ? a.X < b.X : a.Y < b.Y;
  }
};

struct L : array<P, 2> {
  L () = default;
  L(const P& a, const P& b) {
    front() = a;
    back() = b;
  }
  P vec() const {
    return back() - front();
  }
};
D dot(const P& a, const P& b) {
  return (conj(a)*b).X;
}
D cross(const P& a, const P& b) {
  return (conj(a)*b).Y;
}
int ccw(P a, P b, P c) {
  b -= a;
  c -= a;
  if(cross(b, c) > 0) return +1; // ccw
  if(cross(b, c) < 0) return -1; // cw
  if(dot(b, c) < 0) return +2; // L c-a-b
  if(norm(b) < norm(c)) return -2; // L a-b-c
  return 0;
}

bool intersectLL(const L& l, const L& m) {
  return abs(cross(l.vec(), m.vec())) > EPS ||
    abs(cross(l[1] - l[0], m[0] - l[0])) < EPS;
}

vector<string> split(const string& s, char c = ' ') {
  stringstream ss(s);
  vector<string> ret;
  string t;
  while(getline(ss, t, c)) ret.push_back(t);
  return ret;
}
int main() {
  string s;
  while(getline(cin, s)) {
    auto v = split(s);
    vector<P> p(4);
    rep(i, 4) {
      D x, y;
      x = stof(v[i*2].c_str());
      y = stof(v[i*2+1].c_str());
      p[i] = {x, y};
    }
    if(ccw(p[0], p[1], p[2]) == -1) {
      swap(p[1], p[2]);
    }
    assert(ccw(p[0], p[1], p[2]) == 1);
    bool f = true;
    rep(i, 3) {
      int j = (i+1)%3;
      if(ccw(p[i], p[j], p[3]) != 1) f = false;
    }
    cout << (f? "YES" : "NO") << endl;
  }
  return 0;
}

