#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
#include<array>

using namespace std;

int main()
{
  array<double, 4> x;
  array<double, 4> y;
  char c;

  while( cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c >> x[2] >> c >> y[2] >> c >> x[3] >> c >> y[3] )
    {
      array<double, 2> vx;
      array<double, 2> vy;
      bool convex = true;

      for ( int i = 0; i < 4; ++i )
        {
          vx[0] = x[(i+2)%4] - x[(i+1)%4];
          vy[0] = y[(i+2)%4] - y[(i+1)%4];
          vx[1] = x[i%4] - x[(i+1)%4];
          vy[1] = y[i%4] - y[(i+1)%4];

          if ( ( vx[0] * vy[1] - vx[1] * vy[0] )  < 0 )
            {
              convex = false;
              break;
            }
        }
      
      if ( convex )
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  
  return 0;
}