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

double 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++ ){
		int next;
		if ( i == 2 ) 
			next = '0';
		else
			next = i + 1;
		if ( x[i] < x[next] && x[i] > x[3] || x[i] > x[next] && x[i] < x[3] )
			return "NO";
		if ( y[i] < y[next] && y[i] > y[3] || y[i] > y[next] && y[i] < y[3] )
			return "NO";
	}
	return "YES";
}