#include <bits/stdc++.h>
using namespace std;
struct P {
  double x, y;
};
double euc(P a, P b) {
  a.x -= b.x;
  a.y -= b.y;
  return sqrt(a.x * a.x + a.y * a.y);
}
double tri(P a, P b, P c) {
  a.x -= c.x, a.y -= c.y;
  b.x -= c.x, b.y -= c.y;
  c.x -= c.x;
  c.y -= c.y;
  return fabs(b.x * a.y - a.x * b.y) / 2.0;
}
int main() {
  vector<P> d(4);
  string line;
  while (getline(cin, line)) {
    while (~line.find(",")) line[line.find(",")] = ' ';
    stringstream ss(line);
    for (int i = 0; i < 4; i++) {
      if (ss >> d[i].x >> d[i].y)
        ;
      else
        return 0;
    }
    double sum = 0;
    sum = tri(d[0], d[1], d[2]) + tri(d[0], d[2], d[3]);
    bool flag = true;
    for (int i = 0; i < 1 << 4; i++) {
      if (__builtin_popcount(i) != 3) continue;
      vector<P> 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;
  }
}
