#include <bits/stdc++.h>
typedef struct {
  double x;
  double y;
} Point;
int FuncJudgeCross(const Point *p1, const Point *p2, const Point *p3,
                   const Point *p4) {
  Point line[3];
  double temp[2];
  line[0].x = p1->x - p2->x;
  line[0].y = p1->y - p2->y;
  line[1].x = p3->x - p1->x;
  line[1].y = p3->y - p1->y;
  line[2].x = p4->x - p1->x;
  line[2].y = p4->y - p1->y;
  temp[0] = line[0].x * line[1].y - line[0].y * line[1].x;
  temp[1] = line[0].x * line[2].y - line[0].y * line[2].x;
  return (temp[0] * temp[1] > 0.0) ? 1 : 0;
}
int main(void) {
  char buf[1024];
  Point apexes[4];
  while (fgets(buf, 1023, stdin) != NULL) {
    sscanf(buf, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &(apexes[0].x),
           &(apexes[0].y), &(apexes[1].x), &(apexes[1].y), &(apexes[2].x),
           &(apexes[2].y), &(apexes[3].x), &(apexes[3].y));
    if (FuncJudgeCross(&apexes[0], &apexes[2], &apexes[1], &apexes[3]) == 1 ||
        FuncJudgeCross(&apexes[1], &apexes[3], &apexes[0], &apexes[2]) == 1) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
  return 0;
}
