#include <bits/stdc++.h>
using namespace std;
double cross(pair<double, double> lineA, pair<double, double> lineB) {
  return (lineA.first * lineB.second - lineB.first * lineA.second) /
         sqrt((lineB.first - 0) * (lineB.first - 0) +
              (lineB.second - 0) * (lineB.second - 0));
}
int main() {
  pair<double, double> pointA, pointB, pointC, pointD;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &pointA.first, &pointA.second,
               &pointB.first, &pointB.second, &pointC.first, &pointC.second,
               &pointD.first, &pointD.second) != EOF) {
    vector<pair<double, double> > point;
    point.push_back(pointA);
    point.push_back(pointB);
    point.push_back(pointC);
    point.push_back(pointD);
    bool hekomi = false;
    for (int i = 0; i < point.size(); i++) {
      pair<double, double> lineA(point[(i + 1) % 4].first - point[i].first,
                                 point[(i + 1) % 4].second - point[i].second);
      pair<double, double> lineB(point[(i + 2) % 4].first - point[i].first,
                                 point[(i + 2) % 4].second - point[i].second);
      if (cross(lineA, lineB) < 0) {
        hekomi = true;
        break;
      }
    }
    cout << (hekomi ? "NO" : "YES") << endl;
  }
  return 0;
}
