while line=gets
	input=line.chomp.split(",").map{|s| s.to_f}
	xs=[input[0],input[2],input[4],input[6]]
	ys=[input[1],input[3],input[5],input[7]]

	x0=xs[3]
	y0=ys[3]

	op=nil
	ans="YES"

	4.times{|i|
		x=xs[i]
		y=ys[i]
		x1=xs[(i+1)%4]
		y1=ys[(i+1)%4]
		op_i=(x-x0)*(y1-y)-(y-y0)*(x1-x)

		if op==nil then
			op=op_i
		elsif op*op_i<0
			ans="NO"
			break
		end

		x0=x
		y0=y	
	}
	puts ans
end
