#include <bits/stdc++.h>
struct pos {
  double x, y;
};
double angle(struct pos a, struct pos b) {
  if (a.x == b.x) {
    if (a.y > b.y)
      return 3 * M_PI / 2;
    else
      return M_PI / 2;
  } else {
    if (b.x > a.x)
      return 2 * M_PI - atan(((b.y - a.y) / (b.x - a.x)));
    else
      return M_PI + atan(((b.y - a.y) / (b.x - a.x)));
  }
}
int main(void) {
  int i;
  struct pos a[4];
  while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a[0].x, &a[0].y, &a[1].x,
                &a[1].y, &a[2].x, &a[2].y, &a[3].x, &a[3].y)) {
    for (i = 0; i < 4; i++)
      if (angle(a[i % 4], a[(i + 1) % 4]) +
              angle(a[(i + 1) % 4], a[(i + 2) % 4]) >
          M_PI) {
        printf("NO\n");
        break;
      }
    if (i == 4) printf("YES\n");
  }
  return 0;
}
