#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


constexpr double eps = 1e-10;
int sgn(double a) { return a < -eps ? -1 : a > eps; }
using P = complex<double>;
namespace std {
  istream& operator>>(istream& i, P& p) { double x, y; i >> x >> y; p = P(x, y); return i; }
  ostream& operator<<(ostream& o, const P& p) { return o << real(p) << ' ' << imag(p); }
}
double dot(const P& p, const P& q) { return real(conj(p) * q); }
double cross(const P& p, const P& q) { return imag(conj(p) * q); }

int ccw(P p0, P p1, P p2) {
  p1 -= p0, p2 -= p0;                         //             (1)
  if (sgn(cross(p1, p2)) > 0) return 1;       //
  if (sgn(cross(p1, p2)) < 0) return -1;      // (-2)---p0---(0)---p1---(2)
  if (sgn(dot(p1, p2) < 0)) return -2;        //
  if (sgn(norm(p1) - norm(p2)) < 0) return 2; //             (-1)
  return 0;
}

V<string> split(const string& s, char c) {
  V<string> res;
  stringstream ss(s);
  string t;
  while (getline(ss, t, c)) res.push_back(t);
  return res;
}

int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    auto ss = split(s, ' ');
    V<P> p(3);
    for (int i = 0; i < 3; ++i) {
      p[i] = {stod(ss[2 * i]), stod(ss[2 * i + 1])};
    }
    P q = {stod(ss[6]), stod(ss[7])};
    bool in = true;
    for (int i = 0; i < 3; ++i) {
      if (ccw(p[i], p[(i + 1) % 3], p[(i + 2) % 3]) != ccw(p[i], p[(i + 1) % 3], q)) {
        in = false;
        break;
      }
    }
    cout << (in ? "YES" : "NO") << '\n';
  }
}
