def cross(p0, p1, p2):
  dx1, dx2 = p1[0] - p0[0], p2[0] - p0[0]
  dy1, dy2 = p1[1] - p0[1], p2[1] - p0[1]
  return True if dy2 * dx1 > dy1 * dx2 else False
 
while True:
  l = [float(x) for x in raw_input().split(',')]
  a = l[0:2]
  b = l[2:4]
  c = l[4:6]
  d = l[6:8]
  if((cross(a, c, b) != cross(a, c, d)) and (cross(b, d, a) != cross(b, d, c))):
    print 'YES'
  else:
    print 'NO'