Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func check(x, y, x1, y1, x2, y2 float64) float64 {
	return (x2-x1)*y - (y2-y1)*x + x1*y2 - x2*y1
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 8)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 8; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		if check(a[0], a[1], a[2],a[3], a[6], a[7])*check(a[4], a[5], a[2], a[3], a[6], a[7]) < 0 && check(a[6], a[7], a[0], a[1], a[4], a[5])*check(a[2],a[3], a[0], a[1], a[4], a[5]) < 0 {
			fmt.Println("YES")	
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include "bits/stdc++.h"
#include <cassert>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999
//#define INF (1LL<<59)

#define OUT 0
#define ON 1
#define IN 2
#define EPS (1e-10)
class P{                    //???
public:
    double x,y;
    
    P(double _x=0,double _y=0):x(_x),y(_y){};
    P operator + (P &p     ){ return P( x+p.x , y+p.y ); }  //??????
    P operator - (P &p     ){ return P( x-p.x , y-p.y ); }  //??????
    P operator * (double k ){ return P( x*k   , y*k    ); } //??????
    P operator / (double k ){ return P( x/k   , y/k    ); } //??????
    
    bool operator == (const P &p){ return ( fabs(x-p.x)<EPS && fabs(y-p.y)<EPS ); }
    //    bool operator < (const P &p)const{ return ( x!=p.x ? x<p.x:y<p.y ); }
    
    double norm(){ return x*x+y*y; }        //?????????
    double abs() { return sqrt(norm()); }   //??§??????
    
};
struct C{P p;double r;};    //???
struct L{P p1,p2;};         //??´???
typedef vector<P> Polygon;  //????§???¢
typedef P Vector;           //????????????

double dot  (Vector a,Vector b) { return a.x*b.x+a.y*b.y; }
double cross(Vector a,Vector b) { return a.x*b.y-a.y*b.x; }
double sqDist(P a, P b)       {return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);}
double dist (P a, P b)          {return sqrt(sqDist(a,b));}

int ccw(P p0,P p1,P p2){    //AOJ_BOOK_P386 verified
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    
    if( cross(a,b) > EPS  ) return 1 ;      //COUNTER_CLOCKWISE
    if( cross(a,b) < -EPS ) return -1;      //CLOCKWISE
    if( dot(a,b)   < -EPS ) return 2;       //ONLINE_BACK
    if( a.norm()   < b.norm() ) return -2;  //ONLINE_FRONT
    
    return 0;                               //ON_SEGMENT;
}

//??´?????´????????? verified AOJ0058
bool orthogonal(P p1,P p2,P p3,P p4){ return abs(dot(p1-p2,p3-p4))<EPS; }

//??????????????????
bool intersect(P p1,P p2,P p3,P p4){ return ( ccw(p1,p2,p3)*ccw(p1,p2,p4)<=0 && ccw(p3,p4,p1)*ccw(p3,p4,p2)<=0 ); }

//????????¨???????????¢ verified ARC042-B
double dLP(L l, P p) { return abs(cross(l.p2-l.p1, p-l.p1)) /(l.p2-l.p1).abs(); }

// ?????¨??????????????????
int contains(C c, P p){
    double d = (c.p-p).abs();
    if(d-c.r>EPS) return OUT;
    if(abs(d-c.r)<EPS) return ON;
    return IN;
}

//??´?????¨??????????????????(????????£???????????´??????????????±???)
bool intersect_circle_(P center, double r, L line){
    if( dLP(line,center) <= r+EPS ) return true;
    return false;
}

//????????¨???????????¢ verified QUPC-G
double dSP(L s, P p){
    if(dot((s.p2-s.p1)   , p-s.p1) <= EPS) return (p - s.p1).abs();
    if(dot((s.p2-s.p1)*-1, p-s.p2) <= EPS) return (p - s.p2).abs();
    return dLP(s, p);
}

//????????¨??????????????????(????????£???????????´??????????????±???) verified QUPC-G
bool iCS(C c, L l){
    int c1 = contains(c, l.p1);
    int c2 = contains(c, l.p2);
    if(c1 > c2) swap(c1, c2);
    
    // (OUT, OUT) (OUT, ON) (OUT, IN) (ON, ON) (ON, IN) (IN, IN) ???6??????
    if(c1 == OUT && c2 == IN) return true;
    if(c1 == IN  && c2 == IN) return false;
    if(c1 == ON) return true; // (??\????????¨???)
    double d = dSP(l, c.p);
    if(d-c.r<-EPS) return true;
    if(d-c.r>EPS) return false;
    return true; // (??\????????¨???)
}

//????´?????§???¢??????
bool isSimple( Polygon pol ){
    //???????????????????????????pol?????\????????????
    size_t pol_size = pol.size()-1;
    rep(i,pol_size){
        for(int j=i+2;j<pol_size;j++){
            if( i==j || i==(j-1+pol_size)%pol_size || i==(j+1+pol_size)%pol_size )continue;
            if( intersect(pol[i], pol[i+1], pol[j], pol[j+1]) )return false;
        }
    }
    return true;
}


//?????????????§???¢????????´?????????????????????????±??????? true???????????´ verified AOJ0012
bool isPointInsidePolygon(vector<P> pol,P p){
    int c=0;
    rep(i,pol.size()){
        if( cross(pol[i]-pol[(i+1)%pol.size()] , p-pol[(i+1)%pol.size()])>0 ) c++;
    }
    return !(c%pol.size());
}

//?????¨???????§???¢???????????¶???????????????
int CPOLarea(C c ,Polygon pol){
    vector<L> lines;
    vector<int> res(pol.size());
    bool POLinC=true, isFar=true;
    
    rep(i,pol.size()){
        res[i] = contains(c,pol[i]);
        if(sqDist(c.p,pol[i])-c.r*c.r<-EPS)isFar=false;
        lines.pb( L{ pol[i] , pol[(i+1)%pol.size()] });
    }
    rep(i,res.size()) if( res[i]==OUT )POLinC=false;
    
    rep(i,lines.size()) if( iCS(c,lines[i]) )       return 1;   //????§???¢??¨????????????
    if( POLinC )                                    return 2;   //????§???¢??????????????¨
    if( isPointInsidePolygon(pol, c.p) && isFar )   return 3;   //????§???¢????????¨??????
    return 0;
}

//?????? verified AOJ0068,QUPC-G
//???????????§??????
bool cmp_x(const P& p, const P& q){
    if(p.x != q.x)return p.x<q.x;
    return p.y<q.y;
}

//??????????±???????
vector<P> convex_hull(vector<P> ps){
    int n = ps.size();
    sort(all(ps),cmp_x);
    int k=0;            //?????????????????°
    vector<P> qs(n*2);  //?§????????????????
    //?????´???????????????
    rep(i,n){
        while( k>1 && cross((qs[k-1]-qs[k-2]) , (ps[i]-qs[k-1]))<=0 ) k--;
        qs[k++]=ps[i];
    }
    //?????????????????????
    for(int i=n-2, t=k;i>=0;i--){
        while( k>t && cross((qs[k-1]-qs[k-2]) , (ps[i]-qs[k-1]))<=0 ) k--;
        qs[k++]=ps[i];
    }
    qs.resize(k-1);
    return qs;
}


int main(){
    double a,b,c,d,e,f,g,h;
    char ch;
    while(cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e>>ch>>f>>ch>>g>>ch>>h){
        Polygon pol(4);
        pol[0]=P(a,b);
        pol[1]=P(c,d);
        pol[2]=P(e,f);
        pol[3]=P(g,h);
        Polygon res = convex_hull(pol);
        if(res.size()==4)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include"bits/stdc++.h"
#include<cassert>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
const long long mod = 998244353;
const long long inf = 1ll << 61;
const double eps = 0.000000000001;
typedef pair<int, int> P;
typedef pair<P, int>PP;
struct edge { int to; int cost; };

double det(double x11,double x12,double x21,double x22) {
	return x11*x22 - x12*x21;
}

signed main() {
	double x[4],y[4];
	while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3])) {
		double ans[4];
		rep(i, 4) {
			ans[i] = det(x[(i + 1) % 4] - x[i], y[(i + 1) % 4] - y[i], x[(i + 2) % 4] - x[i], y[(i + 2) % 4] - y[i]);
		}
		rep(i, 3)ans[0] *= ans[i + 1];
		if (ans[0] > 0)puts("YES");
		else puts("NO");
	}
}