while line = gets do
  s = line.split.map(&:to_f)   
  z = 0.5 * ((s[0] - s[4]) * (s[3] - s[5]) - (s[1] - s[5]) * (s[2] - s[4])).abs
  a = 0.5 * ((s[0] - s[6]) * (s[3] - s[7]) - (s[1] - s[7]) * (s[2] - s[6])).abs
  b = 0.5 * ((s[0] - s[6]) * (s[5] - s[7]) - (s[1] - s[7]) * (s[4] - s[6])).abs
  c = 0.5 * ((s[2] - s[6]) * (s[5] - s[7]) - (s[3] - s[7]) * (s[4] - s[6])).abs
  if z == a + b + c then
    puts "YES";
  else
    puts "NO"
  end
end