def check(points)
	product = points.cycle.each_cons(3).take(4).map do |p1, p2 ,p3|
		v1 = [p2[0] - p1[0], p2[1] - p1[1]]
		v2 = [p3[0] - p2[0], p3[1] - p2[1]]
		v1[0] * v2[1] - v1[1] * v2[0]
	end.inject(&:*)

	return 0 < product
end

$<.each_line do |line|
	puts check(line.split(',').map(&:to_r).each_slice(2)) ? 'YES' : 'NO'
end