#include <bits/stdc++.h>
using namespace std;
int inf = 1000000000;
bool check(int x1, int y1, int x2, int y2) { return x1 * y2 - y1 * x2 >= 0; }
int main(void) {
  vector<double> xd(4);
  vector<double> yd(4);
  vector<int> x(4);
  vector<int> y(4);
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xd[0], &yd[0], &xd[1],
               &yd[1], &xd[2], &yd[2], &xd[3], &yd[3]) != EOF) {
    for (int i = 0; i < 4; i++) {
      x[i] = 100 * xd[i];
      y[i] = 100 * yd[i];
    }
    bool f = true;
    for (int i = 0; i < 4; i++) {
      int j = i + 1;
      if (check(x[i % 4] - x[(i + 1) % 4], y[i % 4] - y[(i + 1) % 4],
                x[(i + 1) % 4] - x[(i + 2 % 4)],
                y[(i + 1) % 4] - y[(i + 2 % 4)]) !=
          check(x[j % 4] - x[(j + 1) % 4], y[j % 4] - y[(j + 1) % 4],
                x[(j + 1) % 4] - x[(j + 2 % 4)],
                y[(j + 1) % 4] - y[(j + 2 % 4)])) {
        f = false;
        break;
      }
    }
    cout << (f ? "YES" : "NO") << endl;
  }
  return 0;
}
