#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
};
double op(point a, point b) { return a.x * b.y - a.y * b.x; }
int main() {
  point p[4];
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &p[0].x, &p[0].y, &p[1].x,
               &p[1].y, &p[2].x, &p[2].y, &p[3].x, &p[3].y) != EOF) {
    point vec[4];
    for (int i = 0; i < 4; i++) {
      vec[i].x = p[(i + 1) % 4].x - p[i].x;
      vec[i].y = p[(i + 1) % 4].y - p[i].y;
    }
    int check = 0;
    for (int i = 0; i < 4; i++) {
      if (op(vec[i], vec[i + 1]) > 0) {
        check++;
      }
    }
    if (check == 4 || check == 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
