#include <bits/stdc++.h>
using namespace std;
const double precision = 1e-10;
bool eql(double a, double b) { return abs(a - b) < precision; }
double cross(complex<double> a, complex<double> b) {
  return a.real() * b.imag() - b.real() * a.imag();
}
bool rightp(complex<double> start, complex<double> end, complex<double> p) {
  return cross(end - start, p - start) < precision;
}
bool convexp(complex<double> a, complex<double> b, complex<double> c,
             complex<double> d) {
  return (rightp(a, c, b) && rightp(b, d, c) && rightp(c, a, d) &&
          rightp(d, b, a));
}
int main(int argc, char **argv) {
  double xa, ya, xb, yb, xc, yc, xd, yd;
  char c;
  for (;;) {
    cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >>
        xd >> c >> yd;
    if (cin.eof()) break;
    if (convexp(complex<double>(xa, xa), complex<double>(xb, yb),
                complex<double>(xc, yc), complex<double>(xd, yd)))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
