ef side(p1, p2)
   #the line from p1(a,b) to p2(c,d). return [e,f,g] where ex+fy=g
   a,b = p1
   c,d = p2
   e = b - d
   f = c - a
   g = b*c - d*a
   return [e,f,g]
end

def between?(p1, p2, p3, q)
   #Is q between p1 ~ line from p2 to p3?
   a,b,c = side(p2,p3)
   p dist_array = [p1, q].map{|point| point[0]*a + point[1]*b - c }
   if dist_array[0] * dist_array[1] > 0
	  if dist_array[0].abs > dist_array[1].abs
		 return true
	  end
   end
   return false
end

while num = gets
   a,b,c,d,e,f,g,h= num.split(' ').map(&:to_f)
   p1, p2, p3, q = [a,b],[c,d],[e,f],[g,h]
   if between?(p1, p2, p3, q) && between?(p2, p3, p1, q) && between?(p3, p1, p2, q)
	  puts "YES"
   else
	  puts "NO"
   end
end