#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstdio>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
  bool operator < (const P& a, const P& b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}
double cross(const P& a, const P& b) {
  return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
  return real(conj(a)*b);
}

int ccw(P a, P b, P c) {
  b -= a; c -= a;
  if (cross(b, c) > 0)   return +1;       // counter clockwise
  if (cross(b, c) < 0)   return -1;       // clockwise
  if (dot(b, c) < 0)     return +2;       // c--a--b on line
  if (norm(b) < norm(c)) return -2;       // a--b--c on line
  return 0;
}

int main() {
  double a,b,c,d,e,f,g,h;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a,&b,&c,&d,&e,&f,&g,&h) == 8) {
    P aa(a,b), bb(c,d), cc(e,f), dd(g,h);
    if ( ccw(aa,bb,cc)==1&&ccw(bb,cc,dd)==1&&ccw(cc,dd,aa)==1&&ccw(dd,aa,bb)==1 || ccw(aa,bb,cc)==-1&&ccw(bb,cc,dd)==-1&&ccw(cc,dd,aa)==-1&&ccw(dd,aa,bb)==-1)
      cout << "YES";
    else
      cout << "NO";
    cout << endl;
  }
}