def inTriangle?(p)
  x1, y1, x2, y2, x3, y3, x, y = p
  va = [x1 - x, y1 - y]
  vb = [x2 - x, y2 - y]
  vc = [x3 - x, y3 - y]

  s = [[va, vb], [vb, vc], [vc, va]].map{ |a, b| triangleArea(a,b) }
  if s.all?{ |x| x < 0 } || s.all?{ |x| x >= 0 }
    true
  else
    false
  end
end

def triangleArea(a, b)
  (a[0] * b[1] - a[1] * b[0])/2.0
end

if __FILE__ == $0
  loop do
    input = gets
    break if input.nil?
    points = input.split.map(&:to_f)
    puts (inTriangle?(points) ? "YES" : "NO")
  end
end