#include <iostream>
#include <complex>
using namespace std;
typedef complex<double> P;
const double precision = 1e-10;
bool eql(double a, double b) { return abs(a - b) < precision; }
double cross(P a, P b) { return a.real()*b.imag() - b.real()*a.imag(); }
bool rightp(P start, P end, P p) { return cross(end-start, p-start) < precision; }
bool convexp(P a, P b, P c, P 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(P(xa, xa), P(xb, yb), P(xc, yc), P(xd, yd)))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}