#include <bits/stdc++.h>
using namespace std;
bool deb(int x) {
  cout << x << ":ok" << endl;
  return true;
}
bool deb() {
  cout << "ok" << endl;
  return true;
}
double wid(pair<double, double> a, pair<double, double> b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
double yoge(pair<double, double> a, pair<double, double> b,
            pair<double, double> c) {
  double A, B, C;
  A = wid(a, b);
  B = wid(b, c);
  C = wid(c, a);
  return acos((B * B + C * C - A * A) / (2 * B * C));
}
int main() {
  pair<double, double> p[4];
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &p[0].first, &p[0].second,
               &p[1].first, &p[1].second, &p[2].first, &p[2].second,
               &p[3].first, &p[3].second) != EOF) {
    bool ok = true;
    if (yoge(p[0], p[1], p[2]) / 3.1415 * 180 > 90) ok = false;
    if (yoge(p[1], p[2], p[3]) / 3.1415 * 180 > 90) ok = false;
    if (yoge(p[2], p[3], p[0]) / 3.1415 * 180 > 90) ok = false;
    if (yoge(p[3], p[0], p[1]) / 3.1415 * 180 > 90) ok = false;
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
