include Math

$<.each_line do |line|
	points = line.split.map(&:to_f).each_slice(2).to_a
	xp, yp = points.pop

	sum = points.cycle.each_cons(2).take(3).map {|p1, p2|
		a = ((p1[0] - xp) ** 2 + (p1[1] - yp) ** 2) ** 0.5
		b = ((p2[0] - xp) ** 2 + (p2[1] - yp) ** 2) ** 0.5
		c = ((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2) ** 0.5

		acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))
	}.inject(&:+)

	puts sum.round(7) == (2 * PI).round(7) ? 'YES' : 'NO'
end