#include <bits/stdc++.h>
int i, j, f;
double P[4][2], L[4], C[4];
double d(double p[2], double q[2]) {
  double e = p[0] - q[0], f = p[1] - q[1];
  double r = sqrt(e * e + f * f);
  return r;
}
int main() {
  for (; ~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &P[0][0], &P[0][1], &P[1][0],
                &P[1][1], &P[2][0], &P[2][1], &P[3][0], &P[3][1]);) {
    for (j = f = 0; j < 4; j++) L[j] = d(P[j], P[(j + 1) % 4]);
    C[0] = (pow(L[0], 2) + pow(L[1], 2) - pow(d(P[0], P[2]), 2)) /
           (2 * L[0] * L[1]);
    C[1] = (pow(L[1], 2) + pow(L[2], 2) - pow(d(P[1], P[3]), 2)) /
           (2 * L[1] * L[2]);
    C[2] = (pow(L[2], 2) + pow(L[3], 2) - pow(d(P[0], P[2]), 2)) /
           (2 * L[2] * L[3]);
    C[3] = (pow(L[3], 2) + pow(L[0], 2) - pow(d(P[1], P[3]), 2)) /
           (2 * L[3] * L[0]);
    double x = 0.0;
    for (i = 0; i < 4; i++) x += acos(C[i]) / 3.141592 * 180.0;
    puts(x - 360 > 0.00000001 || x - 360 < -0.00000001 ? "NO" : "YES");
  }
  return 0;
}
