#include <bits/stdc++.h>
int main(void) {
  double xa = 0, ya = 0, xb = 0, yb = 0, xc = 0, yc = 0, xd = 0, yd = 0;
  double sum = 0, sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0;
  double s4 = 0;
  double sabc = 0;
  double sabd = 0;
  double sacd = 0;
  double sbcd = 0;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    sum1 = fabs((xa - xb) * (ya + yb));
    sum2 = fabs((xb - xc) * (yb + yc));
    sum3 = fabs((xc - xd) * (yc + yd));
    sum4 = fabs((xd - xa) * (yd + ya));
    sum = sum1 + sum2 + sum3 + sum4;
    s4 = sum / (double)2.0;
    sabc = fabs((xa * yb + xb * yc + xc * ya - ya * xb - yb * xc - yc * xa) /
                (double)2.0);
    sabd = fabs((xa * yb + xb * yd + xd * ya - ya * xb - yb * xd - yd * xa) /
                (double)2.0);
    sacd = fabs((xa * yc + xc * yd + xd * ya - ya * xc - yc * xd - yd * xa) /
                (double)2.0);
    sbcd = fabs((xb * yc + xc * yd + xd * yb - yb * xc - yc * xd - yd * xb) /
                (double)2.0);
    if (s4 > sabc && s4 > sabd && s4 > sacd && s4 > sbcd) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
    sum = 0;
  }
  return 0;
}
