#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

def crossz(v1,v2):
  return v1[0]*v2[1]-v1[1]*v2[0]

for s in sys.stdin:
  d = map(float,s.split(","))
  xa,ya,xb,yb,xc,yc,xd,yd = d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7]
  vab = [xb-xa,yb-ya]
  vbc = [xc-xb,yc-yb]
  vcd = [xd-xc,yd-yc]
  vda = [xa-xd,ya-yd]
  dotb = crossz(vab,vbc)
  dotc = crossz(vbc,vcd)
  dotd = crossz(vcd,vda)
  dota = crossz(vda,vab)
  if dotb*dotc*dotd*dota > 0:
    print "YES"
  else:
    print "NO"