#include <bits/stdc++.h>
using namespace std;
struct vector2D {
  double x;
  double y;
};
vector2D subVector(const vector2D& t1, const vector2D& t2) {
  vector2D ret;
  ret.x = t1.x - t2.x;
  ret.y = t1.y - t2.y;
  return ret;
}
bool hittest(vector2D a, vector2D b, vector2D c, vector2D p) {
  vector2D AB = subVector(b, a);
  vector2D BP = subVector(p, b);
  vector2D BC = subVector(c, b);
  vector2D CP = subVector(p, c);
  vector2D CA = subVector(a, c);
  vector2D AP = subVector(p, a);
  double c1 = AB.x * BP.y - AB.y * BP.x;
  double c2 = BC.x * CP.y - BC.y * CP.x;
  double c3 = CA.x * AP.y - CA.y * AP.x;
  if ((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0)) {
    return true;
  }
  return false;
}
signed main(void) {
  vector2D p1, p2, p3, p4;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &p1.x, &p1.y, &p2.x, &p2.y,
               &p3.x, &p3.y, &p4.x, &p4.y)) {
    if (hittest(p1, p2, p3, p4) || hittest(p1, p2, p4, p3) ||
        hittest(p1, p3, p4, p2) || hittest(p2, p3, p4, p1))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
