while line = STDIN.gets
  x1, y1, x2, y2, x3, y3, xp, yp = line.chomp.split(' ').map { |item| item.to_f }
  a = (x2-x1)*(y3-y1)-(x3-x1)*(y2-y1)
  b = (xp-x1)*(y3-y1)-(x3-x1)*(yp-y1)
  c = (x2-x1)*(yp-y1)-(xp-x1)*(y2-y1)
  s = b/a
  t = c/a
  if s>0 and t>0 and 0<s+t and s+t<1 then
    puts "YES"
  else
    puts "NO"
  end
end