def deg(ax, ay, bx, by, cx, cy)
	return (bx - ax) * (cy - ay)  - (cx - ax) * (by - ay)
end

while line = gets do
	xa, ya, xb, yb, xc, yc, xd, yd = line.split(",").map(&:to_f)

	d0 = deg(xa, ya, xb, yb, xd, yd)
	d1 = deg(xb, yb, xc, yc, xa, ya)
	d2 = deg(xc, yc, xd, yd, xb, yb)
	d3 = deg(xd, yd, xa, ya, xc, yc)

	if (d0 < 0 && d1 < 0 && d2 < 0 && d3 < 0) ||
	   (d0 > 0 && d1 > 0 && d2 > 0 && d3 > 0) then
		puts "YES"
	else
		puts "NO"
	end 
end