while True:
	try:
		s = [] ; right = 0 ; left = 0
		x = map(float,raw_input().split(','))
		for val in xrange(4):
			if x[0]-x[2] != 0:
				if (x[0]-x[2])*(x[5]-x[1]) > (x[1]-x[3])*(x[4]-x[0]): left += 1
				else: right += 1
			else:
				if x[1] < x[3]:
					if x[0] < x[4]: left += 1
					else: right += 1
				else:
					if x[0] > x[4]: left += 1
					else: right += 1
			a=x[0] ; x[0]=x[2] ; x[2]=x[4] ; x[4]=x[6] ; x[6]=a
			b=x[1] ; x[1]=x[3] ; x[3]=x[5] ; x[5]=x[7] ; x[7]=b
		if right == 4 or left == 4: print 'YES'
		else: print 'NO'
	except: break