#include <bits/stdc++.h>
using namespace std;
double euc(pair<double, double> a, pair<double, double> b) {
  a.first -= b.first;
  a.second -= b.second;
  return sqrt(a.first * a.first + a.second * a.second);
}
double tri(pair<double, double> a, pair<double, double> b,
           pair<double, double> c) {
  a.first -= c.first, a.second -= c.second;
  b.first -= c.first, b.second -= c.second;
  c.first -= c.first;
  c.second -= c.second;
  return fabs(b.first * a.second - a.first * b.second) / 2.0;
}
int main() {
  vector<pair<double, double> > d(4);
  string line;
  while (getline(cin, line)) {
    while (~line.find(",")) line[line.find(",")] = ' ';
    stringstream ss(line);
    for (int i = 0; i < 4; i++) ss >> d[i].first >> d[i].second;
    double sum = (1 << 21);
    sort(d.begin(), d.end());
    do {
      sum = min(sum, tri(d[0], d[1], d[2]) + tri(d[0], d[2], d[3]));
    } while (next_permutation(d.begin(), d.end()));
    bool flag = true;
    for (int i = 0; i < 1 << 4; i++) {
      if (__builtin_popcount(i) != 3) continue;
      vector<pair<double, double> > t;
      for (int j = 0; j < 4; j++) {
        if (i & (1 << j)) {
          t.push_back(d[j]);
        }
      }
      if (tri(t[0], t[1], t[2]) > sum) {
        flag = false;
      }
    }
    cout << (flag ? "YES" : "NO") << endl;
  }
}
