#include <bits/stdc++.h>
using namespace std;
double cross(const complex<double>& a, const complex<double>& b) {
  return imag(conj(a) * b);
}
double dot(const complex<double>& a, const complex<double>& b) {
  return real(conj(a) * b);
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool isconvex(const vector<complex<double> >& complex<double>) {
  for (int i = 0; i < complex<double>.size(); ++i)
    if (ccw(complex<double>[(i + complex<double>.size() - 1) %
                            complex<double>.size()],
            complex<double>[i],
            complex<double>[(i + 1) % complex<double>.size()]) != 1)
      return false;
  return true;
}
int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc,
               &xd, &yd) != EOF) {
    vector<complex<double> > ps;
    ps.push_back(complex<double>(xa, ya));
    ps.push_back(complex<double>(xb, yb));
    ps.push_back(complex<double>(xc, yc));
    ps.push_back(complex<double>(xd, yd));
    cout << (isconvex(ps) ? "YES" : "NO") << endl;
  }
  return 0;
}
