//Is it Convex?
#include<bits/stdc++.h>
using namespace std;

typedef complex<double> P;
typedef vector<P> G;
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1)%P.size()]

inline double cross(const P &a, const P &b){return imag(conj(a)*b);}
inline double dot(const P &a, const P &b){return real(conj(a)*b);}

int ccw(P a, P b, P c){
  b-=a; c-=a;
  if(cross(b, c) > 0) return +1;
  if(cross(b, c) < 0) return -1;
  if(dot(b, c) < 0) return +2;
  if(norm(b) < norm(c)) return -2;
  return 0;
}
bool isconvex(const G &p){
  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(){
  char t;
  P a, b, c, d;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.real(), &a.imag(), &b.real(), &b.imag(), &c.real(), &c.imag(), &d.real(), &d.imag())!=EOF){
    bool flag=false;
    G g;
    g.clear();
    g.push_back(a); g.push_back(b); g.push_back(c); g.push_back(d);
    if(isconvex(g)){flag=true;}
    g.clear();
    g.push_back(d); g.push_back(c); g.push_back(b); g.push_back(a);
    if(isconvex(g)){flag=true;}

    if(flag) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}