def distance(p1, p2, p3)
  a = p2[1] - p1[1]
  b = p1[0] - p2[0]
  c = a * p1[0] - b * p1[1]
  a * p3[0] + b * p3[1] + c / Math.sqrt(a ** 2 + b ** 2)
end

def same_side?(p1, p2, pa, pb)
  return (distance(p1, p2, pa) * distance(p1, p2, pb) >= 0) ? true : false
end

def inside_triangle?(data)
  p1 = data.slice(0, 2)
  p2 = data.slice(2, 2)
  p3 = data.slice(4, 2)
  pp = data.slice(6, 2)

  point_a = same_side?(p1, p2, p3, pp)
  point_b = same_side?(p2, p3, p1, pp)
  point_c = same_side?(p3, p1, p2, pp)

  point_a && point_b && point_c
end

while line = gets
  puts inside_triangle?(line.split(" ").map(&:to_f)) ? "YES" : "NO"
end