#include <iostream>
#define EPS 1e-10
using namespace std;

struct P{
  double x,y;
};
double det(P&p,P&q,P&r)
{
  return (q.x-p.x)*(r.y - q.y) - (q.y - p.y)*(r.x - q.x); 
}
int main()
{

  P p[4];
  char c;
  while(cin >> p[0].x >>c>> p[0].y){ 
  for(int i = 1 ; i < 4 ; i++ ){
    cin >>c>> p[i].x >>c>> p[i].y;
  }
  int f = 0;
  for(int i = 0 ; i < 4 ; i++ ){
    if(det(p[i%4],p[(i+1)%4],p[(i+2)%4]) <= 0.0){
      cout << "NO" << endl;
      f = 1;
      break;
    }
  }
  if(f == 0)cout << "YES" << endl;
  }
  return 0;
}