#include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include<algorithm>
#define EPS 1e-10
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
#define pb push_back
#define pop pop_back
using namespace std;
typedef pair<double,int> Pos;
 
struct Point{
  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 * (Point p){return Point(x*p.x,y*p.y);}
  Point operator / (Point p){return Point(x/p.x,y/p.y);}
  double dot(Point p){
    return x*p.x+y*p.y;
  }
  double cross(Point p){
    return x*p.y-y*p.x;
  }
  double norm(){
    x*x+y*y;
  }
  double abs(){
    return sqrt(norm());
  }
  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;
  }
};
int ccw(Point p1,Point p2,Point p3){
  Point a = p2-p1;
  Point b = p3-p1;
  if(a.cross(b) > EPS)return COUNTER_CLOCKWISE;
  if(a.cross(b) < -EPS)return CLOCKWISE;
  if(a.dot(b) < -EPS)return ONLINE_BACK;
  if(a.norm() < b.norm())return ONLINE_FRONT;
  return ON_SEGMENT;
}
 
bool cmp_x(const Point& p,const Point& q){
  if(p.x!=q.x)return p.x<q.x;
    return p.y<q.y;
}
 
vector<Point> convex_hull(Point* ps,int n){
  sort(ps,ps+n,cmp_x);
  int k=0;
  vector<Point> qs(n*2);
  for(int i=0;i<n;i++){
    while(k>1 && (qs[k-1]-qs[k-2]).cross(ps[i]-qs[k-1])<=0)k--;
    qs[k++] = ps[i];
  }
  for(int i=n-2,t=k;i>=0;i--){
    while(k>t && (qs[k-1]-qs[k-2]).cross(ps[i]-qs[k-1])<=0)k--;
    qs[k++] = ps[i];
  } 
  qs.resize(k-1);
  return qs;
}
 
bool isIntersect(Point p1,Point p2,Point p3,Point p4){
  return (ccw(p1,p2,p3)*ccw(p1,p2,p4)<=0 && ccw(p3,p4,p1)*ccw(p3,p4,p2)<=0);
}
 
 
int main(){
  Point p1,p2,p3,p4;
  Point poly[5];
   
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p1.x,&p1.y,&p2.x,&p2.y,&p3.x,&p3.y,&p4.x,&p4.y) != EOF){
    double sum=0;   
    poly[0] = p1;poly[1] = p2;poly[2] = p3;poly[3]=p4;poly[4]=p1;
 
 
    vector<Point> pos = convex_hull(poly,4);
 
    if(pos.size() <= 3)cout << "NO" << endl;
    else cout << "YES" << endl;
 
 
  }
  return 0;
} 