#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
inline double det(const complex<double> &a, const complex<double> &b) {
  return (conj(a) * b).imag();
}
int main() {
  double x[4], y[4];
  char c;
  for (; cin >> x[0] >> c >> y[0];) {
    for (int i = 0; i < (int)(3); i++) cin >> c >> x[i + 1] >> c >> y[i + 1];
    double a = 0, b = 0;
    double s = 0.0;
    for (int i = 0; i < (int)(4); i++)
      s += det(complex<double>(x[i], y[i]),
               complex<double>(x[(i + 1) % 4], y[(i + 1) % 4])) /
           2.0;
    s = fabs(s);
    double sub_s = 0;
    for (int j = 0; j < (int)(4); j++) {
      double ss = 0.0;
      for (int i = 0; i < (int)(4); i++)
        if (i != j) {
          int idx = (i + 1) % 4;
          if (i + 1 == j) idx = (i + 2) % 4;
          ss += det(complex<double>(x[i], y[i]),
                    complex<double>(x[idx], y[idx])) /
                2.0;
        }
      ss = fabs(ss);
      sub_s = max(sub_s, ss);
    }
    cout << (s == sub_s ? "YES" : "NO") << endl;
  }
  return 0;
}
