#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() {
  while (!cin.eof()) {
    vector<complex<double> > lct;
    for (int i = 0; i < 4; ++i) {
      double x, y;
      char c;
      cin >> x >> c >> y;
      lct.push_back(complex<double>(x, y));
      if (i != 3) cin >> c;
    }
    cout << solve(lct) << endl;
  }
  return 0;
}
