#include <bits/stdc++.h>
int main(void) {
  char line[80];
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (true) {
    if (fgets(line, sizeof line, stdin) == NULL) {
      break;
    }
    if (sscanf(line, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,", &xa, &ya, &xb, &yb,
               &xc, &yc, &xd, &yd) != 8) {
      break;
    }
    double ab = sqrt(pow(xa - xb, 2) + pow(ya - yb, 2));
    double bc = sqrt(pow(xb - xc, 2) + pow(yb - yc, 2));
    double ac = sqrt(pow(xa - xc, 2) + pow(ya - yc, 2));
    double cd = sqrt(pow(xc - xd, 2) + pow(yc - yd, 2));
    double ad = sqrt(pow(xa - xd, 2) + pow(ya - yd, 2));
    double A0 = ((acos((ab * ab + ac * ac - bc * bc) / (2 * ab * ac))) /
                 (3.14159265358979) * 180.0);
    double B = ((acos((ab * ab + bc * bc - ac * ac) / (2 * ab * bc))) /
                (3.14159265358979) * 180.0);
    double C0 = ((acos((ac * ac + bc * bc - ab * ab) / (2 * ac * bc))) /
                 (3.14159265358979) * 180.0);
    double A1 = ((acos((ad * ad + ac * ac - cd * cd) / (2 * ad * ac))) /
                 (3.14159265358979) * 180.0);
    double C1 = ((acos((ac * ac + cd * cd - ad * ad) / (2 * ac * cd))) /
                 (3.14159265358979) * 180.0);
    double D = ((acos((ad * ad + cd * cd - ac * ac) / (2 * ad * cd))) /
                (3.14159265358979) * 180.0);
    if ((A0 + A1) > 180 || B > 180 || (C0 + C1) > 180 || D > 180) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
