def sign(x1, y1, x2, y2, xp, yp)
  return x1 <=> xp if x1 == x2
  yp <=> (y2 - y1)/(x2 - x1) * (xp - x1) + y1
end

while line = gets
  x1, y1, x2, y2, x3, y3, xp, yp = line.split.map(&:to_f)
  
  xg = (x1 + x2 + x3) / 3.0
  yg = (y1 + y2 + y3) / 3.0

  sign_equal = sign(x1, y1, x2, y2, xg, yg) == sign(x1, y1, x2, y2, xp, yp) &&
               sign(x1, y1, x3, y3, xg, yg) == sign(x1, y1, x3, y3, xp, yp) &&
               sign(x2, y2, x3, y3, xg, yg) == sign(x2, y2, x3, y3, xp, yp)
  
  puts sign_equal ? 'YES' : 'NO'
end