#include <bits/stdc++.h>
double square(double ax, double ay, double bx, double by, double cx,
              double cy) {
  return fabs(ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) / 2.0;
}
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double s, s1, s2, s3, s4;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    s = square(xa, ya, xb, yb, xc, yc) + square(xa, ya, xd, yd, xc, yc);
    s1 = square(xa, ya, xb, yb, xc, yc);
    s2 = square(xa, ya, xc, yc, xd, yd);
    s3 = square(xa, ya, xb, yb, xd, yd);
    s4 = square(xb, yb, xc, yc, xd, yd);
    if ((s1 < s) && (s2 < s) && (s3 < s) && (s4 < s))
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
