#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
void _main();
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  _main();
}
const double EPS = 1e-8;
const double INF = 1e12;
namespace std {
bool operator<(const complex<double>& a, const complex<double>& b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
namespace std {
bool operator==(const complex<double>& a, const complex<double>& b) {
  return abs(real(a) - real(b)) < EPS && abs(imag(a) - imag(b)) < EPS;
}
}  // 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);
}
struct L : public vector<complex<double> > {
  L() {}
  L(const complex<double>& a, const complex<double>& b) {
    push_back(a);
    push_back(b);
  }
};
struct C {
  complex<double> p;
  double r;
  C() {}
  C(const complex<double>& p, double r) : p(p), r(r) {}
};
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;
}
void _main() {
  double a, b, c, d, e, f, g, h;
  while (1 <=
         scanf("%f,%f,%f,%f,%f,%f,%f,%f", &a, &b, &c, &d, &e, &f, &g, &h)) {
    vector<complex<double> > v;
    v.push_back(complex<double>(a, b));
    v.push_back(complex<double>(c, d));
    v.push_back(complex<double>(e, f));
    v.push_back(complex<double>(g, h));
    set<int> s;
    for (int i = 0; i < 4; i++) {
      int j = (i + 1) % 4;
      int k = (i + 2) % 4;
      s.insert(ccw(v[i], v[j], v[k]));
    }
    if (s.size() == 1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
