#include <iostream>

using namespace std;

void swap(double x,double y){
    double box = x;
    x = y;
    y = box;
}

int main() {
    double x[3],y[3],xp,yp;
    
    while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
        if(x[0] < x[1]){
            swap(x[0],x[1]);
        }
        if(x[1] < x[2]){
            swap(x[1],x[2]);
        }
        if(x[0] < x[1]){
            swap(x[0],x[1]);
        }
         if(y[0] < y[1]){
            swap(y[0],y[1]);
        }
        if(x[1] < x[2]){
            swap(y[1],y[2]);
        }
        if(x[0] < x[1]){
            swap(y[0],y[1]);
        }

        if(x[0] < xp && x[2] > xp && y[0] < yp && y[2] > yp){
            cout << "YES" << endl;
        }
        else {
            cout << "NO" << endl;
        }
    }

    return 0;
}