#coding:utf-8


class Point
	def initialize(args)
		@x,@y = args[0],args[1]
	end

	def x
		@x
	end

	def y
		@y
	end
end

class Vector
	def initialize(x,y)
		@x,@y = x,y
	end
	def x
		@x
	end
	def y
		@y
	end
end

#外積を求める
def cross(a,b)
	a.x*b.y - a.y*b.x
end


while (line=gets) != nil do
	data = line.chomp.split(',').map(&:to_f)
	a = Point.new(data[0,2])
	b = Point.new(data[2,2])
	c = Point.new(data[4,2])
	d = Point.new(data[6,2])
	#p data

	ab = Vector.new(b.x-a.x, b.y-a.y)
	bc = Vector.new(c.x-b.x, c.y-b.y)
	cd = Vector.new(d.x-c.x, d.y-c.y)
	da = Vector.new(a.x-d.x, a.y-d.y)
	
	ans =  cross(ab,bc)* cross(bc,cd)*cross(cd,da)*cross(da,ab)
	if ans>0 then
		puts "YES"
	elsif ans<=0 then
		puts "NO"
	end

end