#include<iostream>
#include<cstdlib>
#include<cmath>
#include<vector>

#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
#define EPS (1e-10)
#define equals(a,b) (fabs((a)-(b)) < EPS)

using namespace std;

class Point{
public:
  double x,y;
  
  Point(double x = 0, double y = 0): x(x),y(y){};
  
  Point operator + (Point p) {return Point(x+p.x,y+p.y);}
  Point operator - (Point p) {return Point(x-p.x,y-p.y);}
  Point operator * (double a) {return Point(a*x,a*y);}

  double own_dot(){return x*x+y*y;};
  double abs(){return sqrt(own_dot());}

  bool operator < (const Point &p) const {
    return x != p.x ? x < p.x : y < p.y;
  }
  bool operator == (const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

// 内積 
double dot(Point a, Point b){
  return a.x*b.x+a.y*b.y;
}

// 外積
double cross(Point a, Point b){
  return a.x*b.y-a.y*b.x; 
}

//ベクトルp0p1に対する点p2の位置を求める
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;

int ccw(Point p0, Point p1, Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS) return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS) return CLOCKWISE;
  if(dot(a,b) < -EPS) return ONLINE_BACK;
  if(a.own_dot() < b.own_dot()) return ONLINE_FRONT;
  return ON_SEGMENT;
}


vector<Point> P;
Point in[4];

bool isconvex() {
  for (int i = 0; i < P.size(); i++)
    if (ccw(prev(P, i), curr(P, i), next(P, i)) <= 0) return false;
  return true;
}

int main(){
  while(1){
    char c;

    for(int i = 0; i < 4; i++)
      if(i == 3) cin >> in[i].x >> c >> in[i].y;
      else if(!(cin >> in[i].x >> c >> in[i].y >> c)) return 0;

    P.clear();

    for(int i = 0; i < 4; i++)
      P.push_back(in[i]);

    if(isconvex()) cout << "YES" << endl;
    else cout << "NO" << endl;

  }
  return 0;
}