#include<iostream>

using namespace std;

struct point{
	double x;
	double y;
};

istream& operator >> ( istream& s , point& p )
{
	return s >> p.x >> p.y;
}

bool get_convex( const point& a , const point& b , const point& c , const point& d )
{
	point a_c, a_b, a_d;
	point b_d, b_a, b_c;

	a_c.x = c.x-a.x; a_c.y = c.y-a.y;
	a_b.x = b.x-a.x; a_b.y = b.y-a.y;
	a_d.x = d.x-a.x; a_d.y = d.y-a.y;
	b_d.x = d.x-b.x; b_d.y = d.y-b.y;
	b_a.x = a.x-b.x; b_a.y = a.y-b.y;
	b_c.x = c.x-b.x; b_c.y = c.y-b.y;

	bool result_a, result_b;

	result_a = ( ( a_c.x * a_b.y - a_b.x * a_c.y ) * ( a_c.x * a_d.y - a_d.x * a_c.y ) < 0 );
	result_b = ( ( b_d.x * b_a.y - b_a.x * b_d.y ) * ( b_d.x * b_c.y - b_c.x * b_d.y ) < 0 );

	if( result_a == true && result_b == true ) return true;
	else return false;
}

int main(void)
{
	point a, b, c, d;

	while(1)
	{
		cin >> a >> b >> c >> d;
		if( cin.eof() ) break;
		if( get_convex( a , b , c , d ) ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}