readlines.each do |l|
  x1,y1,x2,y2,x3,y3,xp,yp = l.split.map(&:to_f)
  v1x, v1y = x2-x1, y2-y1
  v2x, v2y = x3-x1, y3-y1
  vpx, vpy = xp-x1, yp-y1
  # (vpx, vpy) = t(v1x, v1y) + u(v2x, v2y)
  t = (vpx*v2y - vpy*v2x)/(v1x*v2y - v1y*v2x)
  u = (vpx*v1y - vpy*v1x)/(v1y*v2x - v2y*v1x)
  if 0<t && 0<u && t+u<1
    puts "YES"
  else
    puts "NO"
  end
end