#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8

static const double PI=6*asin(0.5);
typedef complex<double> P;
typedef long long ll;

double x[10],y[10];



bool foo(P a,P b){
	if(real(a)>=0.0&&real(a)<=real(b)&&imag(a)>=0.0&&imag(a)<=imag(b)) return true;
	return false;
}

int main(){
	double t;
	while(cin>>x[0],!cin.eof()){
		bool f=false;
		cin>>y[0];
		rep(i,3){
			cin>>x[i+1]>>y[i+1];
			x[i+1]-=x[0];
			y[i+1]-=y[0];
		}
		P a(x[1],y[1]);
		P b1(x[2],y[2]),b2(x[2],y[3]),b3(x[3],y[3]),b4(x[3],y[2]);
		//cout<<real(a)<<" "<<imag(a)<<endl<<real(b1)<<" "<<imag(b1)<<endl<<real(b2)<<" "<<imag(b2)<<endl<<real(b3)<<" "<<imag(b3)<<endl<<real(b4)<<" "<<imag(b4)<<endl;
		if(foo(b1,a)) f=true;
		else if(foo(b2,a)) f=true;
		else if(foo(b3,a)) f=true;
		else if(foo(b4,a)) f=true;
		if(f) cout<<"YES\n";
		else cout<<"NO\n";
		
	}
	return 0;
}