while gets do
  x1, y1, x2, y2, x3, y3, xp, yp = $_.split(/\s/).map(&:to_f)
  gx, gy = (x1 + x2 + x3)/3, (y1 + y2 + y3)/3

  def c(x1, y1, x2, y2, x, y)
    (x1 - x2) * (y - y1) - (y1- y2) * (x - x1)
  end

  r1 = c(x1, y1, x2, y2, gx, gy) * c(x1, y1, x2, y2, xp, yp) > 0
  r2 = c(x2, y2, x3, y3, gx, gy) * c(x2, y2, x3, y3, xp, yp) > 0
  r3 = c(x3, y3, x1, y1, gx, gy) * c(x3, y3, x1, y1, xp, yp) > 0
  puts (r1 && r2 && r3) ? 'YES' : 'NO'
end