#include <bits/stdc++.h>
void check(double xa, double ya, double xb, double yb, double xc, double yc,
           double xd, double yd);
double inner_product(double x0, double y0, double x1, double y1, double x2,
                     double y2);
int main(int argc, const char *argv[]) {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    check(xa, ya, xb, yb, xc, yc, xd, yd);
  }
  return 0;
}
double outer_product(double x0, double y0, double x1, double y1, double x2,
                     double y2) {
  return (x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0);
}
void check(double xa, double ya, double xb, double yb, double xc, double yc,
           double xd, double yd) {
  double det0, det1, det2, det3;
  det0 = outer_product(xa, ya, xb, yb, xd, yd);
  det1 = outer_product(xb, yb, xc, yc, xa, ya);
  det2 = outer_product(xc, yc, xd, yd, xb, yb);
  det3 = outer_product(xd, yd, xa, ya, xc, yc);
  if (det0 < 0 || det1 < 0 || det2 < 0 || det3 < 0)
    printf("NO\n");
  else
    printf("YES\n");
}
