#include<iostream>
#include<string>
using namespace std;

float x[4],y[4];
string judge ();

int main() {
	while ( cin >> x[0] ) {
		for( int i = 0; i < 4; i++ )
		if ( !i )
			cin >> y[i];
		else
			cin >> x[i] >> y[i];
		cout << judge () << endl;
		
	}
	return 0;
}

string judge () {
	string res;
	
	for ( int i = 0; i < 3; i++ ){
		if ( x[i] < x[i + 1] && x[i] > x[3] || x[i] > x[i + 1] && x[i] < x[3] )
			return "NO";
		if ( y[i] < y[i + 1] && y[i] > y[3] || y[i] > y[i + 1] && y[i] < y[3] )
			return "NO";
	}
	return "YES";
}