#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;
#define EPS 1e-10

struct Point{
    double x,y;
    Point(){}
    Point(double _x,double _y){
        x=_x; y=_y;
    }
    Point operator +(const Point p)const{
        return Point(x+p.x,y+p.y);
    }
    Point operator -(const Point p)const{
        return Point(x-p.x,y-p.y);
    }
	Point operator *(const double d)const{
		return Point(x*d,y*d);
	}
};

struct Line{
    Point a,b;
    Line(){}
    Line(Point _a,Point _b){
        a=_a; b=_b;
    }
};

double dot(Point p,Point q){
    return p.x*q.x+p.y*q.y;
}

double cross(Point p,Point q){
    return p.x*q.y-q.x*p.y;
}

int ccw(Point a,Point b,Point c){
    if(cross(b-a,c-b)>0) return +1;
    if(cross(b-a,c-b)<0) return -1;
    return 0;
}

bool intersection(Line l,Line m,Point &p){
	Point a1,a2,b1,b2;
	a1 = l.b-l.a; a2 = m.b-m.a;
	b1 = m.a-l.a; b2 = m.b-l.a;
	double s1,s2;
	s1 = abs(cross(a1,b1)); s2 = abs(cross(a1,b2));
	if(s1<EPS && s2<EPS) return false;
	if(s1<EPS) swap(s1,s2);
	p = Point(m.a.x+a2.x*s1/(s1+s2),m.a.y+a2.y*s1/(s1+s2));
}

int main(){
	Point p[4];
	while(true){
		for(int i=0;i<4;i++){
			if(scanf("%lf,%lf,",&p[i].x,&p[i].y)==EOF) return 0;
		}
		int w=0;
		bool ans=true;
		for(int i=0;i<4;i++){
			int w_ = ccw(p[i],p[(i+1)%4],p[(i+2)%4]);
			if(w*w_<0) ans = false;
			w = w_;
		}
		if(ans==true) puts("YES");
		else puts("NO");
	}
    return 0;
}