STDIN.each_line do |line|
  x1, y1, x2, y2, x3, y3, xp, yp = line.split(" ").map(&:to_f)
  a, b, c, d, x, y = x2-x1, x3-x1, y2-y1, y3-y1, xp-x1, yp-y1
  det = a*d-b*c

  s, t = (d*x-b*y)/det, (-c*x+a*y)/det

  puts (s>0 && t>0 && s+t<1)? "YES" : "NO"
end