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>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;

double dist(double x1, double y1, double x2, double y2){
    return sqrt( ((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)) );
}

double outputSin(double x, double y, double z){
    return acos( (x * x +  y * y - z * z) / (2 * x * y) ) ;
}

double inputXY(double x1, double y1, double x2, double y2, double x3, double y3){
    double x, y ,z;
    x = dist(x1, y1, x2, y2);
    y = dist(x2, y2, x3, y3);
    z = dist(x3, y3, x1, y1);
    return outputSin(x, y, z);
}

int main(){
    double x1, y1, x2, y2, x3, y3, x4, y4;
    char gar;
    while(cin >> x1 >> gar >> y1 >> gar >> x2 >> gar >> y2 >> gar >> x3 >> gar >> y3 >> gar >> x4 >> gar >> y4){
        double a, b, c, d;
        a = inputXY(x1, y1, x2, y2, x3, y3);
        b = inputXY(x2, y2, x3, y3, x4, y4);
        c = inputXY(x3, y3, x4, y4, x1, y1);
        d = inputXY(x4, y4, x1, y1, x2, y2);

        if(abs(a + b + c + d - 2 * M_PI) < 0.00001) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}

C++: #include<iostream>
#include<cstdlib>
#include<complex>
using namespace std;
typedef complex<double> Po;
 
double cross(Po a,Po b)
{
	return a.real()*b.imag() - a.imag()*b.real();
}
 
double area(Po a,Po b, Po c)
{
	return abs(cross(b-a,c-a))/2;
}
 
bool inter(Po a, Po b,Po c,Po x)
{
	return (fabs(area(a,b,x)+area(b,c,x)+area(c,a,x)-area(a,b,c))<1e-10);
}
 
int main()
{
	Po p[4];
	double a, b;
	char c, d;

	while(cin >> a >> c >> b){
		p[0] = Po(a, b);
		for(int i=1; i<4; i++)
		{
			cin >> c >> a >> d >> b;
			p[i] = Po(a, b);
		}
		if(inter(p[0],p[1],p[2],p[3]) || inter(p[0],p[2],p[3],p[1]) || inter(p[0],p[1],p[3],p[2]) || inter(p[1],p[2],p[3],p[0]))
			cout << "NO\n";
		else cout << "YES\n";
	}
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


inline double det(const P &a, const P &b) {
	return (conj(a) * b).imag();
}

int main() {
	double x[4], y[4];
	char c;
	for (; cin >> x[0] >> c >> y[0] ; ) {
		rep (i, 3) cin >> c >> x[i + 1] >> c >> y[i + 1];
		double a = 0, b = 0;
		double s = 0.0;
		rep (i, 4) s += det(P(x[i], y[i]), P(x[(i + 1) % 4], y[(i + 1) % 4])) / 2.0;
		s = fabs(s);
		double sub_s = 0;
		rep(j, 4) {
			double ss = 0.0;
			rep(i, 4) if (i != j) {
				int idx = (i + 1) % 4;
				if(i + 1 == j) idx = (i + 2) % 4;
				ss += det(P(x[i], y[i]), P(x[idx], y[idx])) / 2.0;
			}
			ss = fabs(ss);
			sub_s = max(sub_s, ss);
		}
		cout << (s == sub_s ? "YES" : "NO") << endl;
	}
	return 0;
}

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;
	double y;
};

int main(){
	point ten[4];
	while(cin>>ten[0].x){
		scanf(",%lf",&ten[0].y);
		rep(i,3){
			scanf(",%lf,%lf",&ten[i+1].x,&ten[i+1].y);
		}
		double gaiseki[4];
		rep(i,4){
			point vec1,vec2;
			vec1.x = ten[(i+1)%4].x - ten[i].x;
			vec1.y = ten[(i+1)%4].y - ten[i].y;
			vec2.x = ten[(i+2)%4].x - ten[(i+1)%4].x;
			vec2.y = ten[(i+2)%4].y - ten[(i+1)%4].y;
			gaiseki[i] = vec1.x*vec2.y - vec1.y*vec2.x;
		}
		bool neg = false;
		rep(i,4){
			if(gaiseki[i]<0)neg=true;
		}
		if(neg)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define EPS (1e-10)
#define equals(a,b)(fabs((a)-(b))<EPS)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

struct Point {
	double x, y;
	Point(double x = 0, double y = 0) :x(x), y(y) {}
	Point operator*(double a) { return Point(a*x, a*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 norm() { return x*x + y*y; }
};
typedef vector<Point>Polygon;
struct Segment {
	Point p1, p2;
};
double cross(Point a, Point b) {
	return a.x*b.y - a.y*b.x;
}
double dot(Point a, Point b) {
	return a.x*b.x + a.y*b.y;
}
bool isPrallel(Segment s1, Segment s2) {
	return equals(cross(s1.p2 - s1.p1, s2.p2 - s2.p1), 0.0);
}
bool isOrthogonal(Segment s1, Segment s2) {
	return equals(dot(s1.p2 - s1.p1, s2.p2 - s2.p1), 0.0);
}
int contains(Polygon g, Point p) {
	int n = g.size();
	bool x = false;
	rep(i, n) {
		Point a = g[i] - p, b = g[(i + 1) % n] - p;
		if (abs(cross(a, b)) < EPS&&dot(a, b) < EPS)return 1;
		if (a.y > b.y)swap(a, b);
		if (a.y < EPS&&EPS<b.y&&cross(a, b)>EPS)x = !x;
	}
	return x ? 2 : 0;
}
int ccw(Point p0, Point p1, Point p2) {
	Point a = p1 - p0;
	Point b = p2 - p0;
	if (cross(a, b) > EPS)return 1;
	if (cross(a, b) < -EPS)return -1;
	if (dot(a, b) < -EPS)return 2;
	if (a.norm() < b.norm())return -2;
	return 0;
}
bool intersect(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);
}
bool intersect(Segment s1, Segment s2) {
	return intersect(s1.p1, s1.p2, s2.p1, s2.p2);
}
Point project(Segment s, Point p) {
	Point base = s.p2 - s.p1;
	double r = dot(p - s.p1, base) / base.norm();
	return s.p1 + base*r;
}
Point reflect(Segment s, Point p) {
	return p + (project(s, p) - p)*2.0;
}
bool isconvex(Polygon g) {
	rep(i, g.size()) {
		int d = ccw(g[(i + g.size() - 1) % g.size()], g[i], g[(i + 1) % g.size()]);
		if (d == -1)
			return false;
	}
	return true;
}
int main() {
	double xa, ya, xb, yb, xc, yc, xd, yd;
	while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd))
		puts(isconvex({ {xa,ya},{xb,yb},{xc,yc},{xd,yd} }) ? "YES" : "NO");
}