#include <bits/stdc++.h>
int main(void) {
  double Pi = 3.1415926;
  double p, q, theta, x[4], y[4];
  int i, j;
  while (scanf("%lf,%lf", &x[0], &y[0]) != EOF) {
    for (i = 1; i < 4; i++) {
      scanf(",%lf,%lf", &x[i], &y[i]);
    }
    theta = 0;
    for (i = 0, j = 0; i < 4; i++) {
      p = hypot(x[(j + 1) % 4] - x[j], y[(j + 1) % 4] - y[j]);
      q = hypot(x[(j + 2) % 4] - x[(j + 1) % 4],
                y[(j + 2) % 4] - y[(j + 1) % 4]);
      theta +=
          acos(((x[(j + 1) % 4] - x[j]) * (x[(j + 2) % 4] - x[(j + 1) % 4]) +
                (y[(j + 1) % 4] - y[j]) * (y[(j + 2) % 4] - y[(j + 1) % 4])) /
               p / q);
    }
    if ((int)(theta / Pi * 180) == 360)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
