#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 s[4] = {0, 0, 0, 0};
  double max = 0.0;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    s[0] = fabs((xa * yb + xb * yc + xc * ya - ya * xb - yb * xc - yc * xa) /
                (double)2.0);
    s[1] = fabs((xa * yb + xb * yd + xd * ya - ya * xb - yb * xd - yd * xa) /
                (double)2.0);
    s[2] = fabs((xa * yc + xc * yd + xd * ya - ya * xc - yc * xd - yd * xa) /
                (double)2.0);
    s[3] = fabs((xb * yc + xc * yd + xd * yb - yb * xc - yc * xd - yd * xb) /
                (double)2.0);
    int i = 0;
    int m = 0;
    for (i = 0; i < 4; i++) {
      if (max < s[i]) {
        max = s[i];
        m = i;
      }
    }
    s[m] = 0;
    if (max == s[0] + s[1] + s[2] + s[3]) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
