#include <bits/stdc++.h>
using namespace std;
int main() {
  string str = "";
  while (getline(cin, str)) {
    if (str.empty()) {
      break;
    }
    vector<double> x(4, 0.);
    vector<double> y(4, 0.);
    vector<double> vx(4, 0.);
    vector<double> vy(4, 0.);
    while (str.find(',') != string::npos) {
      str = str.replace(str.find(','), 1, " ");
    }
    stringstream ss(str);
    int i;
    for (i = 0; i < 4; ++i) {
      ss >> x[i] >> y[i];
    }
    for (i = 0; i < 4; ++i) {
      vx[i] = x[(i + 1) % 4] - x[i];
      vy[i] = y[(i + 1) % 4] - y[i];
    }
    vector<double> inp(4, 0.);
    for (i = 0; i < 4; ++i) {
      double v2x = vx[(i + 1) % 4] + vx[i];
      double v2y = vy[(i + 1) % 4] + vy[i];
      double v1x = vx[i];
      double v1y = vy[i];
      inp[i] = v1x * v2x + v1y * v2y;
      inp[i] /= sqrt(v1x * v1x + v1y * v1y) * sqrt(v2x * v2x + v2y * v2y);
    }
    for (i = 0; i < 4; ++i) {
      if (inp[i] <= 0.) {
        break;
      }
    }
    if (i == 4) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
