#coding:utf-8

EPS = 1e-3

class Point
	def initialize(args)
		@x,@y = args[0], args[1]
	end

	def x
		@x
	end
	def y
		@y
	end	
end


while !STDIN.eof? do
	str = gets.chomp.split(' ').map(&:to_f)
	#p str
	a = Point.new(str[0,2])
	b = Point.new(str[2,2])
	c = Point.new(str[4,2])
	p = Point.new(str[6,2])
	ab = Point.new([b.x-a.x,b.y-a.y])	
	bc = Point.new([c.x-b.x,c.y-b.y])	
	ca = Point.new([a.x-c.x,a.y-c.y])	
	ap = Point.new([p.x-a.x,p.y-a.y])	
	bp = Point.new([p.x-b.x,p.y-b.y])	
	cp = Point.new([p.x-c.x,p.y-c.y])	
	
	#外積を求める
	puts abap = ab.x*ap.y - ab.y*ap.x
	puts bcbp = bc.x*bp.y - bc.y*bp.x
	puts cacp = ca.x*cp.y - ca.y*cp.x
	
	if  abap==0 || bcbp==0 || cacp==0  then puts "NO"
	elsif abap*bcbp<0 || abap*cacp<0 || bcbp*cacp<0 then puts "NO"
	else puts "YES"
	end
	puts
end