import sys

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 dy2 * dx1 - dy1 * dx2
 
for line in iter(sys.stdin.readline, ''):
  l = [float(r) for r in line.split(',')]
  a, b, c, d = l[0:2], l[2:4], l[4:6], l[6:8]
  print 'YES' if (cross(a, c, b) * cross(a, c, d)) < 0 and (cross(b, d, a) * cross(b, d, c) < 0) else 'NO'