#include <bits/stdc++.h>
int main(void) {
  int i, f;
  double x[4], y[4];
  while (scanf("%lf,%lf", &x[0], &y[0]) != EOF) {
    for (i = 1; i < 4; i++) scanf(",%lf,%lf", &x[i], &y[i]);
    f = 1;
    for (i = 0; i < 4; i++) {
      if ((x[(i + 1) % 4] - x[i]) * (y[(i + 2) % 4] - y[i]) -
              (x[(i + 2) % 4] - x[i]) * (y[(i + 1) % 4] - y[i]) <
          0)
        f = 0;
    }
    printf("%s\n", f ? "YES" : "NO");
  }
  return 0;
}
