#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)
typedef complex<double> Point;
const double EPS = 1.0e-9;
const double PI = acos(-1);
namespace std {
    bool operator < (const Point& a, const Point& b){
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
struct Line : public vector<Point> {
    Line(const Point& a, const Point& b){
        push_back(a);
        push_back(b);
    }
};
double cross(const Point& a, const Point& b){
    return imag(conj(a) * b);
}
double dot(const Point& a, const Point& b) {
    return real(conj(a) * b);
}
bool input(vector<Point>& vP){
    rep(i, 3) cin >> vP[i].real() >> vP[i].imag();
    if(cin.eof())
      return false;
    else
      return true;
}
int main(){
    vector<Point> t(3);
    Point p;
    cin.tie(0);
    ios::sync_with_stdio(false);
    while(input(t)){
        cin >> p.real() >> p.imag();
        bool is_IN = false;
        rep(i, 3){
            Point a = t[i] - p, b = t[(i + 1) % 3] - p;
            if(imag(a) > imag(b)) swap(a, b);
            if(imag(a) <= 0 && 0 < imag(b))
              if(cross(a, b) < 0) is_IN = !is_IN;
            if(cross(a, b) == 0 && dot(a, b) <= 0){
                is_IN = true;
                break;
            }
        }
        if(is_IN)
          cout << "YES" << endl;
        else
          cout << "NO" << endl;
    }
    return 0;
}