/*by SilverN*/
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int read(){
    int x=0,f=1;char ch=getchar();
    while(ch<'0' || ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0' && ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
struct point{
    double x,y;
    point operator - (point rhs){return (point){x-rhs.x,y-rhs.y};}
    point operator + (point rhs){return (point){x+rhs.x,y+rhs.y};}
}p[5];
double Cross(point a,point b){return a.x*b.y-a.y*b.x;}
bool judge(){
	if(Cross(p[3]-p[1],p[2]-p[1])<0)swap(p[3],p[2]);
	if(Cross(p[2]-p[1],p[4]-p[1])>0)return 0;
	if(Cross(p[3]-p[2],p[4]-p[2])>0)return 0;
	if(Cross(p[1]-p[3],p[4]-p[3])>0)return 0;
	return 1;
}
int main(){
	int i,j;
	while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",
		&p[1].x,&p[1].y,&p[2].x,&p[2].y,&p[3].x,&p[3].y,&p[4].x,&p[4].y)!=EOF){
		if(judge())printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}