#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-9;
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
string solve(vector<complex<double> > vc) {
  bool sgo;
  for (int i = 0; i < vc.size(); ++i) {
    bool sg = cross(vc[i] - vc[(i + 2) % vc.size()],
                    vc[(i + 1) % vc.size()] - vc[(i + 2) % vc.size()]) > 0;
    if (i == 0) {
      sgo = sg;
      continue;
    }
    if (sgo ^ sg) return "NO";
  }
  return "YES";
}
int main() {
  double x[4], y[4];
  char c;
  vector<complex<double> > lct;
  while (cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c >> x[2] >> c >>
             y[2] >> c >> x[3] >> c >> y[3],
         !cin.eof()) {
    for (int i = 0; i < 4; ++i) {
      lct.push_back(complex<double>(x[i] + 100.0, y[i] + 100.0));
    }
    cout << solve(lct) << endl;
  }
  return 0;
}
