#include <bits/stdc++.h>
float line(float x1, float y1, float x2, float y2, float x, float y) {
  return (x1 - x2) * (y - y1) - (y1 - y2) * (x - x1);
}
int main() {
  float x[4], y[4];
  int i;
  while (scanf("%f,%f,", x, y) > 0) {
    for (i = 1; i < 4; i++) scanf("%f,%f,", x + i, y + i);
    for (i = 0; i < 4; i++) {
      if (line(x[i], y[i], x[(i + 1) % 4], y[(i + 1) % 4], x[(i + 2) % 4],
               y[(i + 2) % 4]) *
              line(x[i], y[i], x[(i + 1) % 4], y[(i + 1) % 4], x[(i + 3) % 4],
                   y[(i + 3) % 4]) <
          0)
        break;
    }
    puts(i == 4 ? "YES " : "NO ");
  }
  return 0;
}
