#include <bits/stdc++.h>
double xa, ya, xb, yb, xc, yc, xd, yd;
int chokusen(double x1, double y1, double x2, double y2, double x, double y) {
  double w;
  int r;
  w = (y - y1) - (y2 - y1) / (x2 - x1) * (x - x1);
  r = (w > 0.0) - (w < 0.0);
  return (r);
}
int main() {
  while (EOF != scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb,
                      &xc, &yc, &xd, &yd)) {
    if (xa == xc)
      printf("%s\n", (xb - xa) * (xd - xa) < 0 ? "YES" : "NO");
    else if (xb == xd)
      printf("%s\n", (xa - xb) * (xc - xb) < 0 ? "YES" : "NO");
    else {
      if (chokusen(xa, ya, xc, yc, xb, yb) * chokusen(xa, ya, xc, yc, xd, yd) <
              0 &&
          chokusen(xb, yb, xd, yd, xa, ya) * chokusen(xb, yb, xd, yd, xc, yc) <
              0)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
  return (0);
}
