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<iostream>
#include<cmath>
using namespace std;
int main(){
char c;
double xa,ya,xb,yb,xc,yc,xd,yd,ab,bc,cd,da,aa,bb,cc,dd;
while(cin>>xa){
cin>>c>>ya>>c>>xb>>c>>yb>>c>>xc>>c>>yc>>c>>xd>>c>>yd;
aa=sqrt((xb-xa)*(xb-xa));
bb=sqrt((xc-xb)*(xc-xb));
cc=sqrt((xd-xc)*(xd-xc));
dd=sqrt((xa-xd)*(xa-xd));
ab=((xb-xa)*(xc-xb)+(yb-ya)*(yc-yb))/(aa*bb);
bc=((xc-xb)*(xd-xc)+(yc-yb)*(yd-yc))/(bb*cc);
cd=((xd-xc)*(xa-xd)+(yd-yc)*(ya-yd))/(cc*dd);
da=((xa-xd)*(xb-xa)+(ya-yd)*(yb-ya))/(dd*aa);
if(ab*bc<0||bc*cd<0||cd*da<0||da*ab<0)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
return 0;
}

C++: #include <iostream>

using namespace std;

struct Vector {
        double x;
        double y;
};

bool is_c_inner(double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd) {
    Vector ab = Vector{xb - xa, yb - ya};
    Vector bc = Vector{xc - xb, yc - yb};

    Vector bd = Vector{xd - xb, yd - yb};
    Vector dc = Vector{xc - xd, yc - yd};

    Vector da = Vector{xa - xd, ya - yd};
    Vector ac = Vector{xc - xa, yc - ya};

    double cross_product_1 = ab.x * bc.y - ab.y * bc.x;
    double cross_product_2 = bd.x * dc.y - bd.y * dc.x;
    double cross_product_3 = da.x * ac.y - da.y * ac.x;

    return (cross_product_1 >=  0 && cross_product_2 >=  0 && cross_product_3 >=  0) ||
            (cross_product_1 <=  0 || cross_product_2 <=  0 && cross_product_3 <=  0);
}

int main() {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    string result;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) == 8) {
        if(is_c_inner( xa, ya, xb, yb, xc, yc, xd, yd)
                || is_c_inner(xb, yb, xc, yc, xd, yd, xa, ya)
                || is_c_inner(xc, yc, xd, yd, xa, ya, xb, yb)
                || is_c_inner(xd, yd, xa, ya, xb, yb, xc, yc)
                ) {
            result = "NO"; // no convex
        } else {
            result = "YES"; //convex
        }
        cout << result << endl;
    }
    return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <fstream>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toStr(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,(n)-1)
const double EPS = 1e-12;
const double PI = acos(-1.0);
const int INF = INT_MAX/10;

#include <complex>
typedef complex<double> P;

double dot(P a, P b) {
	return (a.real()*b.real() + a.imag()*b.imag());
}

double cross(P a, P b) {
	return (a.real()*b.imag() - a.imag()*b.imag());
}

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

namespace std {
	bool operator<(const P &a, const P &b) {
		return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
	}
}

vector<P> convex_hull(vector<P> ps) {
	int n = ps.size(), k = 0;
	sort(ALL(ps));
	vector<P> ch(2*n);
	for(int i = 0; i < n; ch[k++] = ps[i++])
		while(k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
	for(int i = n-2, t = k+1; i >= 0; ch[k++] = ps[i--])
		while(k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
	ch.resize(k-1);
	return ch;

}

int main() {
	double xa, ya, xb, yb, xc, yc, xd, yd;
	char c;
	while(cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd) {
		P a(xa, ya), b(xb, yb), c(xc, yc), d(xd, yd);
		vector<P> points;
		points.push_back(a);
		points.push_back(b);
		points.push_back(c);
		points.push_back(d);

		if(convex_hull(points).size() != 4) {
			cout << "NO" << endl;
		} else {
			cout << "YES" << endl;
		}
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;

vector<pair<double, double>> point(4);

typedef pair<double, double> P;

int dot(P a, P b){
	return a.first*b.second - a.second*b.first;
}

bool In(P a, P b, P c, P p){
	auto ab = P(b.first - a.first, b.second - a.second);
	auto bc = P(c.first - b.first, c.second - a.second);
	auto ca = P(a.first - c.first, a.second - c.second);
	auto ap = P(p.first - a.first, p.second - a.second);
	auto bp = P(p.first - b.first, p.second - b.second);
	auto cp = P(p.first - c.first, p.second - c.second);

	return (dot(ab, bp) > 0 && dot(bc, cp) > 0 && dot(ca, ap) > 0 || dot(ab, bp) < 0 && dot(bc, cp) < 0 && dot(ca, ap) < 0);

}

int main(){
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &point[0].first, &point[0].second, &point[1].first, &point[1].second, &point[2].first, &point[2].second, &point[3].first, &point[3].second) != EOF){
		vector<int> aa = { 0, 1, 2, 3 };
		bool f = true;

		do{
			f &= !In(point[aa[0]], point[aa[1]], point[aa[2]], point[aa[3]]);
		} while (next_permutation(aa.begin(), aa.end()));

		cout << (f?"YES":"NO") << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <cstdio>

using namespace std;

struct p{
	double x;
	double y;

	p operator -(p& rh){
		p pnt;
		pnt.x = this->x - rh.x;
		pnt.y = this->y - rh.y;
		return pnt;
	}

	void print(){
		cout << this->x << ", " << this->y << endl;
	}
};

double cross(p a, p b){
	return a.x*b.y - a.y*b.x;
}

bool isLeft(p a, p b, p c){	// c が ab より左ならtrue
	a.print();
	b.print();
	c.print();
	cout << "cross:" << cross(b-a, c-a) << endl << endl;
	return (cross(b-a, c-a) > 0);
}

bool isInside(p a, p b, p c, p d){ // d が abc 内部なら true
	bool left = false;
	bool right = false;

	bool m, n, l;
	m = isLeft(a, b, d);
	n = isLeft(b, c, d);
	l = isLeft(c, a, d);
	left = m || n || l;
	right = !m || !n || !l;
	
	return left^right;
}

int main(){

	p pnt[4];

	while(scanf("%lf", &pnt[0].x) != EOF){
		scanf(",%lf", &pnt[0].y);
		for(int i = 1; i < 4; i++){
			scanf(",%lf", &pnt[i].x);
			scanf(",%lf", &pnt[i].y);
		}

		bool b = true;

		for(int i = 0; i < 4 && b; i++){
			b &= !isInside(pnt[(i+0)%4], pnt[(i+1)%4], pnt[(i+2)%4], pnt[(i+3)%4]);
		}

		if(b){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

	return 0;
}