#include <bits/stdc++.h>
using namespace std;
class PointF {
 public:
  double x, y;
  PointF() {}
  PointF(int X, int Y) {
    x = X;
    y = Y;
  }
  double fun(PointF p) {
    return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
  }
};
PointF point[4];
double ab, ac, ad, bc, bd, cd;
void set() {
  ab = point[0].fun(point[1]);
  ac = point[0].fun(point[2]);
  ad = point[0].fun(point[3]);
  bc = point[1].fun(point[2]);
  bd = point[1].fun(point[3]);
  cd = point[2].fun(point[3]);
}
double check(double a, double b, double c) {
  double S = (a + b + c) / 2;
  return sqrt(S - a + S - b + S - c);
}
int main() {
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &point[0].x, &point[0].y,
               &point[1].x, &point[1].y, &point[2].x, &point[2].y, &point[3].x,
               &point[3].y) != EOF) {
    set();
    if (check(ab, bc, ac) + check(ac, ad, cd) ==
        check(ab, bd, ad) + check(bc, cd, bd)) {
      printf("YES\n");
    } else
      printf("NO\n");
  }
  return 0;
}
