#include <iostream>
#include <algorithm>
#include <deque>

using namespace std;

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)
	{
		double a,b,c,d;
		sort(x,x+3);
		sort(y,y+3);
		a=x[0],b=x[2],c=y[0],d=y[2];

		int ture=0;
		if(a<xp && xp<b) ture++;
		if(c<yp && yp<d)ture++;

		if(ture==2)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

	}

	return 0;
}