while line = gets do
  x1, y1, x2, y2, x3, y3, xp, yp = line.split.map(&:to_f)
  gx = (x1 + x2 + x3) / 3.0
  gy = (y1 + y2 + y3) / 3.0
  def c(x1, y1, x2, y2, x, y)
      (y2 - y1) * (x - x1) - (x2 - x1) * (y - y1)
  end
  s1 = c(x1, y1, x2, y2, gx, gy) * c(x1, y1, x2, y2, xp, yp)
  s2 = c(x2, y2, x3, y3, gx, gy) * c(x2, y2, x3, y3, xp, yp)
  s3 = c(x3, y3, x1, y1, gx, gy) * c(x3, y3, x1, y1, xp, yp)
  if s1 > 0 && s2 > 0 && s3 >0 then
    puts "YES"
  else
    puts "NO"
  end
end