#include <bits/stdc++.h>
using namespace std;
float calc_crossProduct(float x1, float y1, float x2, float y2) {
  return (x1 * y2 - y1 * x2);
}
int main() {
  int cnt = 0;
  while (true) {
    string strall;
    cin >> strall;
    vector<float> x(4, 0.0);
    vector<float> y(4, 0.0);
    char c;
    for (int i = 0; i < 4; i++) {
      int pos = strall.find(",");
      x[i] = std::stof(strall.substr(0, pos));
      strall.erase(strall.begin(), strall.begin() + pos + 1);
      y[i] = std::stof(strall.substr(0, pos));
      strall.erase(strall.begin(), strall.begin() + pos + 1);
    }
    if (cnt < 2) {
      for (int i = 0; i < 4; i++) {
      }
      cnt++;
    }
    bool flag = true;
    vector<float> cp(4, 0.0);
    for (int i = 0; i < 4; i++) {
      float x1 = x[i];
      float y1 = y[i];
      float x2 = x[(i + 1) % 4];
      float y2 = y[(i + 1) % 4];
      float x3 = x[(i + 2) % 4];
      float y3 = y[(i + 2) % 4];
      float x2x1 = x2 - x1;
      float y2y1 = y2 - y1;
      float x3x1 = x3 - x1;
      float y3y1 = y3 - y1;
      cp[i] = calc_crossProduct(x2x1, y2y1, x3x1, y3y1);
      if (cp[i] < 0) {
        flag = false;
        break;
      }
    }
    if (flag != false) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
