def vector(x, y)
  [y[0] - x[0], y[1] - x[1]]
end

def direction(x, y)
  x[0] * y[1] - x[1] * y[0] > 0 ? :+ : :-
end

STDIN.read.split("\n").each do |input|
  a, b, c, d = input.split(' ').map { |f| f.chomp.to_f }.each_slice(2).to_a

  result = [[a, b], [b, c], [c, a]].map do |s, e|
    direction(vector(s, e), vector(e, d))
  end
  puts result.uniq.size == 1 ? 'YES' : 'NO'
end