#include <bits/stdc++.h>
typedef struct _point {
  double x;
  double y;
  double theta;
} point_t;
int main() {
  point_t p[4], vec1, vec2;
  int i = 0, j, flag = 0;
  char str[100], *tp;
  double tmpx, tmpy, s;
  while (fgets(str, 100, stdin)) {
    i = 0;
    tp = strtok(str, ",");
    while (i < 4) {
      p[i].x = atof(tp);
      tp = strtok(NULL, ",");
      p[i].y = atof(tp);
      tp = strtok(NULL, ",");
      if (i != 0) {
        if (p[0].y > p[i].y) {
          tmpx = p[i].x;
          tmpy = p[i].y;
          p[i].x = p[0].x;
          p[i].y = p[0].y;
          p[0].x = tmpx;
          p[0].y = tmpy;
        } else if (p[0].y == p[i].y) {
          if (p[0].x > p[i].x) {
            tmpx = p[i].x;
            tmpy = p[i].y;
            p[i].x = p[0].x;
            p[i].y = p[0].y;
            p[0].x = tmpx;
            p[0].y = tmpy;
          }
        }
      }
      i++;
    }
    for (i = 1; i < 4; i++) {
      p[i].theta = atan((p[i].y - p[0].y) / (p[i].x - p[0].x));
    }
    for (i = 1; i < 4; i++) {
      for (j = i + 1; j < 4; j++) {
        if (p[i].theta > p[j].theta) {
          tmpx = p[i].x;
          tmpy = p[i].y;
          p[i].x = p[j].x;
          p[i].y = p[j].y;
          p[j].x = tmpx;
          p[j].y = tmpy;
        }
      }
    }
    flag = 0;
    for (i = 0; i < 4; i++) {
      s = p[i % 4].x * p[(i + 1) % 4].y + p[(i + 1) % 4].x * p[(i + 2) % 4].y +
          p[(i + 2) % 4].x * p[i % 4].y - p[i % 4].y * p[(i + 1) % 4].x -
          p[(i + 1) % 4].y * p[(i + 2) % 4].x - p[(i + 2) % 4].y * p[i % 4].x;
      if (s < 0) {
        flag++;
      }
    }
    if (flag) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
