#include <iostream>
#include <stdio.h>
#include <utility>
using namespace std;
int main(){
	pair<double,double> tp[3];
	pair<double,double> p;
	bool flag;
	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&tp[0].first,&tp[0].second,&tp[1].first,&tp[1].second,&tp[2].first,&tp[2].second,&p.first,&p.second) == 8){
		flag=true;
		for(int i=0;i<3;i++){
			if (tp[i%3].second-tp[(i+1)%3].second==0){
				if((p.second-tp[i%3].second)*(tp[(i+2)%2].second-tp[i%3].second)<0)flag=false;
			}else {
				if((p.second - (tp[i%3].first-tp[(i+1)%3].first)/(tp[i%3].second-tp[(i+1)%3].second)*(p.first-tp[i%3].first)+tp[i%3].second)*(tp[(i+2)%2].second - (tp[i%3].first-tp[(i+1)%3].first)/(tp[i%3].second-tp[(i+1)%3].second)*(tp[(i+2)%2].first-tp[i%3].first)+tp[i%3].second)<0)flag=false;
			}
		}
		if(flag)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}