#include <iostream>
#include <cstdio>
#include <complex>

using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()

//¼üp1p3Æüªp2p4Ìð·»è
//1ÂÌüªp1p3ÆA»êÉÜÜêÈ¢2_p2,p4ÉÂ¢ÄAp1p3Æp1p2Ap1p3Æp1p4A»ê¼êÉÂ¢ÄOÏðßÄ»ÌÏðæé
//OÏÌ³ÍxNgÌÈ·pÌsinÉËéÌÅAp2,p4Ì»ê¼êªp1p3Ì¶É é©EÉ é©ªí©é
//³Èçð·µÄ¢È¢AÈçð·µÄ¢éA0Èç¼üã
double is_intersected(P p1,P p2,P p3,P p4) {

  return (((p3.X-p1.X)*(p2.Y-p1.Y)-(p3.Y-p1.Y)*(p2.X-p1.X))*((p3.X-p1.X)*(p4.Y-p1.Y)-(p3.Y-p1.Y)*(p4.X-p1.X)));

}

int main() {

  double xa,ya,xb,yb,xc,yc,xd,yd;

  //¼üACÆüªBDA é¢ÍüªACÆ¼üBDªð·µÄ¢êÎÊp`
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF) {

    P a(xa,ya),b(xb,yb),c(xc,yc),d(xd,yd);

    if(is_intersected(a,b,c,d)>0.0 || is_intersected(b,a,d,c)>0.0) cout << "NO" << endl;

    else cout << "YES" << endl;

  }

  return 0;

}