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