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++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;

typedef complex<double> P;
double sq(double x){return x*x;}

double cross(P x,P y){
	return x.real() * y.imag() - x.imag() * y.real();
}

int main(){
	double x[4],y[4];
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)){
		P p[4];
		for (int i = 0; i < 4; i++)
			p[i] = P(x[i],y[i]);
		bool f[4];
		memset(f,0,4);
		for (int i = 0; i < 4; i++)
			if(cross(p[(i+2)&3] - p[(i+1)&3],p[i] - p[(i+1)&3]) < 0)
				f[i] = true;
		int sum = accumulate(f,f+4,0);
		if(sum == 0 || sum == 4) puts("YES");
		else puts("NO");

	}

	return 0;
}

C++: #include <complex>
#include <cstdio>
#include <cmath>
using namespace std;

// ?????§?¨?????????¨??????
typedef complex<double> P;

//XY??§?¨?
#define X real()
#define Y imag()

// ??´???p1,p2??¨??????p3,p4???????????????
// (n < 0)<=>?????? , (n == 0)<=>??´??????, (n > 0)<=>?????????????????????  
double isIntersect(P p1, P p2, P p3, P p4){  
    return ( (p1.X-p2.X)*(p3.Y-p1.Y) - (p1.Y-p2.Y)*(p1.X-p3.X)) * ((p1.X-p2.X)*(p4.Y-p1.Y) - (p1.Y-p2.Y)*(p1.X-p4.X));  
}

int main(){
	double xa, xb, xc, xd, ya, yb, yc, yd;

	while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF ){
		P a( xa , ya );
		P b( xb , yb );
		P c( xc , yc );
		P d( xd , yd );
		
		if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
			printf("NO\n");
		}else{
			printf("YES\n");
		}
	}
}

C++: #include<iostream>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

struct point{
	double x,y;
};

double op(point a,point b){
	return a.x*b.y-a.y*b.x;
}

int main(){
	point p[4];
	while(scanf("%f,%f,%f,%f,%f,%f,%f,%f",&p[0].x,&p[0].y,&p[1].x,&p[1].y,&p[2].x,&p[2].y,&p[3].x,&p[3].y)!=EOF){
		point vec[4];
		rep(i,4){
			vec[i].x=p[(i+1)%4].x-p[i].x;
			vec[i].y=p[(i+1)%4].y-p[i].y;
		}
		bool check[4];
		rep(i,4){
			check[i]=(op(vec[i],vec[i+1])>0);
		}
		if(check[0] xor check[1] xor check[2] xor check[3]){
			cout<<"NO"<<endl;
		}else{
			cout<<"YES"<<endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<stdio.h>
using namespace std;

vector<pair<int,int> >vec;

int 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])!=EOF){
        double a[4],b[4];
        for(int i=0;i<4;i++){
            a[i]=x[(i+1)%4]-x[i];
            b[i]=y[(i+1)%4]-y[i];
        }
        int suc=1;
        for(int i=0;i<4;i++){
            if((a[i]*b[(i+1)%4]-b[i]*a[(i+1)%4])*(a[(i+1)%4]*b[(i+2)%4]-b[(i+1)%4]*a[(i+2)%4])<0){
           //     cout<<(x[i]*y[(i+1)%4]-y[i]*x[(i+1)%4])<<"     "<<(x[(i+1)%4]*y[(i+2)%4]-y[(i+1)%4]*x[(i+2)%4])<<endl;
                suc=0;
                break;
            }
          //  cout<<(x[i]*y[(i+1)%4])<<"    "<<(y[i]*x[(i+1)%4])<<"     "<<(x[(i+1)%4]*y[(i+2)%4])<<"    "<<(y[(i+1)%4]*x[(i+2)%4])<<endl;
        }
        if(suc)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  P p[6];
  while(~scanf("%lf,%lf,",&p[1].real(),&p[1].imag())){
    REP(i,3) scanf("%lf,%lf,",&p[i+2].real(),&p[i+2].imag());
    p[5] = p[1];
    p[0] = p[4];
    bool ans = true;
    REP(i,4){
      P v1 = p[i+1] - p[i];
      P v2 = p[i+2] - p[i+1];
      v1 /= abs(v1); v2 /= abs(v2);
      P tmp = v2 / v1;
      if(tmp.imag() < 0 + EPS) ans = false;
    }
    puts(ans?"YES":"NO");
  }
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

bool check(double x1, double y1, double x2, double y2){
  return x1 * y2 - y1 * x2 >= 0;
}

int main(void) {

  vector<double> x(4);
  vector<double> 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]) != EOF ){
    bool f = true;
    for(int i=0; i<4; i++){
      int j = i + 1;
      if( check(x[i%4]-x[(i+1)%4], y[i%4]-y[(i+1)%4], x[(i+1)%4]-x[(i+2%4)], y[(i+1)%4]-y[(i+2%4)]) != check(x[j%4]-x[(j+1)%4], y[j%4]-y[(j+1)%4], x[(j+1)%4]-x[(j+2%4)], y[(j+1)%4]-y[(j+2%4)]) ){
        f = false;
        break;
      }
    }
    cout << ( f ? "YES":"NO") << endl;
  }

  return 0;
}

// EOF

C++: #include <iostream>
#include <cmath>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;

const double EPS = 1e-12;

double add(double a, double b) {
	if (abs(a + b) < EPS * (abs(a) + abs(b)))
		return 0;
	return a + b;
}

struct P {
	double x, y;
	P() {};
	P(double x, double y) : x(x), y(y) {
	}

	P operator + (P p) {
		return P(add(x, p.x), add(y, p.y));
	}

	P operator - (P p) {
		return P(add(x, -p.x), add(y, -p.y));
	}

	P operator * (double d) {
		return P(x * d, y * d);
	}

	P operator / (double d) {
		return P(x / d, y / d);
	}

	// 内積
	double dot(P p) {
		return add(x * p.x, y * p.y);
	}

	// 外積
	double det(P p) {
		return add(x * p.y, -y * p.x);
	}
};

// 線分上に点があるか
bool on_seg(P p1, P p2, P q) {
	return (p1 - q).det(p2 - q) == 0 && (p1 - q).dot(p2 - q) <= 0;
}

// 直線と直線の交点
P intersection(P p1, P p2, P q1, P q2) {
	return p1 + (p2 - p1) * ((q2 - q1).det(q1 - p1) / (q2 - q1).det(p2 - p1));
}

// 2直線の直行判定
bool line_orth(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).dot(b1 - b2)) < EPS;
}

// 2直線の平行判定
bool line_paral(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).det(b1 - b2)) < EPS;
}

// 進行方向
int ccw(P a, P b, P c) {
	b = b - a; c = b - c;
	if (b.det(c) > 0)
		return +1;
	else if (b.det(c) < 0)
		return -1;
	return 0;
}

int main(void) {
	string str;
	P p[4];
	while (getline(cin, str)) {
		replace(str.begin(), str.end(), ',', ' ');
		stringstream buf(str);
		for (int i = 0; i < 4; i++) {
			buf >> p[i].x >> p[i].y;
		}

		int a = 0, b = 0;
		for (int i = 0; i < 4; i++) {
			a += ccw(p[i], p[(i+1)%4], p[(i+2)%4]);
			b += abs(ccw(p[i], p[(i+1)%4], p[(i+2)%4]));
		}

		cout << (abs(a) == b ? "YES" : "NO") << endl;
	}
}