#include<iostream>
#include<cmath>

using namespace std;

double CalcurateTheta(double, double, double, double, double, double);
double CalcurateLength(double, double, double, double);
int CheckRadian(double);

int main(){
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double a, b, c, d, w, x, y, z; 
  char c1, c2, c3, c4, c5, c6, c7;

  while(cin >> xa >> c1 >> ya >> c2 >> xb >> c3 >> yb >> c4 >> xc >> c5 >> yc >> c6 >> xd >> c7 >> yd){
    a = CalcurateTheta(xa, ya, xb, yb, xd, yd);
    b = CalcurateTheta(xb, yb, xc, yc, xa, ya);
    c = CalcurateTheta(xc, yc, xd, yd, xb, yb);
    d = CalcurateTheta(xd, yd, xa, ya, xc, yc);

    w = CheckRadian(a+b+d);
    x = CheckRadian(b+c+a);
    y = CheckRadian(c+d+b);
    z = CheckRadian(d+a+c);

    if(w == 1 && x == 1 && y == 1 && z == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}

double CalcurateTheta(double xa, double ya, double xb, double yb, double xc, double yc){
  double a, b, c, cos_theta, theta;

  a = CalcurateLength(xa, ya, xb, yb);
  b = CalcurateLength(xc, yc, xa, ya);
  c = CalcurateLength(xb, yb, xc, yc);

  cos_theta = (a*a + b*b - c*c)/(2*a*b);
  theta = acos(cos_theta);

  return theta;
}

double CalcurateLength(double x1, double y1, double x2, double y2){
  double a, b, c;

  a = x2 - x1;
  b = y2 - y1;
  c = sqrt(a*a + b*b);

  return c;
}

int CheckRadian(double radian){
  if(radian > M_PI)
    return 1;
  else
    return 0;
}