#include <bits/stdc++.h>
using namespace std;
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 abs(a.first * b.second + b.second * a.first) / 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 S = tri(d[0], d[2], d[1]) + tri(d[0], d[2], d[3]);
    bool flag = true;
    for (int i = 0; i < 4; i++) {
      double s = tri(d[0], d[2], d[1]) + tri(d[0], d[2], d[3]);
      if (s != S) flag = false;
      rotate(d.begin(), d.begin() + 1, d.end());
    }
    cout << (flag ? "YES" : "NO") << endl;
  }
}
