line = $stdin
lines = line.readlines
line.close

Vertex = Struct.new("Vertex", :x, :y)

def subv(a, b)
	return Vertex.new((b.x - a.x), (b.y - a.y))
end

def cross(a, b)
	return (a.x * b.y - a.y * b.x)
end

lines.each do |l|
	arr = l.split(",")
	va = Vertex.new(arr[0].to_f, arr[1].to_f)
	vb = Vertex.new(arr[2].to_f, arr[3].to_f)
	vc = Vertex.new(arr[4].to_f, arr[5].to_f)
	vd = Vertex.new(arr[6].to_f, arr[7].to_f)
	vAC = subv(va, vc)
	vAB = subv(va, vb)
	vAD = subv(va, vd)
	vBD = subv(vb, vd)
	vBA = subv(vb, va)
	vBC = subv(vb, vc)
	if (cross(vAC, vAB) * cross(vAC, vAD) < 0) &&
		(cross(vBD, vBA) * cross(vBD, vBC) < 0) then
		puts "YES"
	else
		puts "NO"
	end
end