#include <bits/stdc++.h>
using namespace std;
double Helon(pair<double, double> pa, pair<double, double> pb,
             pair<double, double> pc) {
  double a, b, c;
  a = sqrt((pb.first - pa.first) * (pb.first - pa.first) +
           (pb.second - pa.second) * (pb.second - pa.second));
  b = sqrt((pc.first - pb.first) * (pc.first - pb.first) +
           (pc.second - pb.second) * (pc.second - pb.second));
  c = sqrt((pa.first - pc.first) * (pa.first - pc.first) +
           (pa.second - pc.second) * (pa.second - pc.second));
  double s = (a + b + c) / 2;
  return (sqrt(s * (s - a) * (s - b) * (s - c)));
}
void solve() {
  vector<pair<double, double> > p(4);
  while (scanf("%lf,%lf", &p[0].first, &p[0].second)) {
    for (int i = 1; i < 4; ++i) {
      scanf(",%lf,%lf", &p[i].first, &p[i].second);
    }
    double S1, S2;
    S1 = Helon(p[0], p[1], p[2]);
    S1 += Helon(p[0], p[2], p[3]);
    S2 = Helon(p[0], p[1], p[3]);
    S2 += Helon(p[1], p[2], p[3]);
    if (fabs(S1 - S2) < 1e-10) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
int main() {
  solve();
  return (0);
}
