$<.readlines.each do |l|
  x1, y1, x2, y2, x3, y3, xp, yp = l.split.map(&:to_f)
  xa, ya = xp - x1, yp - y1
  xb, yb = x3 - x1, y3 - y1
  xc, yc = x2 - x3, y2 - y3
  r = xb * yc - xc * yb
  s = (yc * xa - xc * ya) / r
  u = (xb * ya - yb * xa) / r
  t = u / s
  puts((0 < s and s < 1 and 0 < t and t < 1) ? "YES" : "NO")
end
