#include<iostream>
#include<cmath>

using namespace std;

#define EPS 1e-5

struct point{
	double x;
	double y;
};

struct line{
	double a; // 傾き
	double b; // y切片
};

istream& operator >> ( istream& s , point& p );
bool get_line( const point& a , const point& b , line *a_b );
bool get_position( const point& a , const point& b , const point& c );
bool get_cross( const point& a , const point& b , const point& c , const point& d );
bool get_convex( const point& a , const point& b , const point& c , const point& d );

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;
}

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

bool get_line( const point& a , const point& b , line *a_b )
{
	if( fabs(a.x - b.x) < EPS ) return false;
	else{
		a_b->a = (a.y - b.y)/(a.x - b.x);
		a_b->b = a.y - (a.x * a_b->a);
		return true;
	}
}

bool get_position( const point& a , const point& b , const point& c )
{
	// 点a, bを通る直線に対する点cの位置を返す。(右、上：ture)

	line a_b;

	bool result = get_line( a , b , &a_b );
	if( result == false ){
		if( c.x > a.x ) return true;
		else return false;
	}
	else{
		if( c.y > a_b.a * c.x + a_b.b ) return true;
		else return false;
	}
}

bool get_cross( const point& a , const point& b , const point& c , const point& d )
{
	// 点a, cを結ぶ線分と、点b, dを通る直線とが交わればtrueを返す。

	bool result_ac_b = get_position( a , c , b );
	bool result_ac_d = get_position( a , c , d );
	if( result_ac_b == result_ac_d ) return false;
	else return true;
}

bool get_convex( const point& a , const point& b , const point& c , const point& d )
{
	// 点a, b, c, dの順に結んだ時にできる四角形が凸であればtrueを返す。

	bool result_ac_bd = get_cross( a , b , c , d ); // 線分acと直線bdの交差判定
	bool result_bd_ac = get_cross( b , a , d , c ); // 線分bdと直線acの交差判定

	if( result_ac_bd == true && result_bd_ac == true ) return true;
	else return false;
}