#include <bits/stdc++.h>
int zcos(double x1, double y1, double x2, double y2) {
  double pred = (x1 * x2 + y1 * y2) / (((x1) * (x1)) + ((y1) * (y1))) /
                (((x2) * (x2)) + ((y2) * (y2)));
  if (pred > 0.) {
    return (1);
  } else if (pred < 0.) {
    return (-1);
  }
  return (0);
}
int main(int argc, char* argv[]) {
  double x[4], y[4];
  int i;
  while (scanf(" %lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", x, y, x + 1, y + 1, x + 2,
               y + 2, x + 3, y + 3) == 8) {
    int positive = 0, negative = 0;
    for (i = 0; i < 4; ++i) {
      int pred = zcos(x[(i + 1) % 4] - x[i], y[(i + 1) % 4] - y[i],
                      x[(i + 2) % 4] - x[(i + 1) % 4],
                      y[(i + 2) % 4] - y[(i + 1) % 4]);
      positive += !!(pred > 0);
      negative += !!(pred < 0);
    }
    puts(positive && negative ? "NO" : "YES");
  }
  return (0);
}
