#include <bits/stdc++.h>
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 res = 1;
    for (i = 0; i < 4; ++i) {
      const double x1 = x[(i + 1) % 4] - x[i],
                   x2 = x[(i + 2) % 4] - x[(i + 1) % 4],
                   y1 = y[(i + 1) % 4] - y[i],
                   y2 = y[(i + 2) % 4] - y[(i + 1) % 4];
      res = res && (((x1 * x2) + (y1 * y2)) / (((x1) * (x1)) + ((y1) * (y1))) /
                        (((x2) * (x2)) + ((y2) * (y2))) >=
                    0.);
    }
    puts(res ? "YES" : "NO");
  }
  return (0);
}
