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