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 <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
#include<cstdio>
#include<iostream>
using namespace std;
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double inner_product(point a,point b);//内積
double outer_product(point a,point b);//外積
bool vec_parallel(point vec1,point vec2);//ベクトルの並行判定(交差判定falseとしても使える)
bool vec_angle_right(point vec1,point vec2);//ベクトルの直行判定
bool cross_line_segment(line a,point p1,point p2);//直線と線分の交差判定

class point{
public:
	double x,y;
	point(){
		x=0;
		y=0;
	}
	point(double a,double b){
		x=a;
		y=b;
	}
	void in(double a,double b){
		x=a;
		y=b;
		return ;
	}
};
//直線クラス
class line{
public:
	point s,v;
public:
	line(point a,point b){
		s=a;
		v=vec_sub(a,b);
	}
};
//ベクトルの足し算
point vec_add(point vec1,point vec2){
	point res(vec1.x+vec2.x,vec1.y+vec2.y);
	return res;
}
//ベクトルの引き算
point vec_sub(point vec1,point vec2){
	point res(vec1.x-vec2.x,vec1.y-vec2.y);
	return res;
}
//内積
double inner_product(point a,point b){
	return a.x * b.x + a.y * b.y;
}
//外積
double outer_product(point a,point b){
	return a.x * b.y - a.y * b.x;
}

point p[6];

bool solve(){
	bool judge;
	bool ans;
	if(outer_product(p[0],p[1])>0){
		judge=true;
	}else{
		judge =false;
	}
	for(int i=1;i<4;i++){
		if(outer_product(p[i],p[i+1])>0){
			if(judge!=true) return false;
		}else if(outer_product(p[i],p[i+1])==0){
			return false;
		}else{
			if(judge!=false) return false;
		}
	}
	return true;
}



int main(){
	
	
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&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){
		p[4]=p[0];
		p[5]=p[1];
		for(int i=0;i<5;i++){
			p[i]=vec_sub(p[i],p[i+1]);
		}
		bool ans=solve();
		
		if(ans){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	
}

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	double point[8];
	
	char c;
	bool yes;
	while (cin >> point[0] >> c >> point[1] >> c >> point[2] >> c >> point[3] >> c >> point[4] >> c >> point[5] >> c >> point[6] >> c >> point[7]){
		vector<bool> posi;
		yes=true;
		REP(i, 4){
			double angle = point[i * 2] * point[(i * 2 + 2) % 8 + 1] - point[i * 2 + 1] * point[(i * 2 + 2) % 8];
			if (angle>0.0){
				posi.push_back(true);
			} else if(angle<0.0) {
				posi.push_back(false);
			}
		}
		if (posi[0] == posi[1] && posi[2] == posi[1] && posi[2] == posi[3])
			cout << "YES"<<endl;
			else
				cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <climits>

using namespace std;

double EPS = 1e-10;

//誤差を考慮して足し算を行う
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);
	}
	double dot(P p) {	//　内積
		return add(x * p.x, y * p.y);
	}
	double det(P p) {	//　外積
		return add(x * p.y, -y * p.x);
	}
};

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

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


int main() {

	P a, b, c, d;
	char dummy;

	while ( cin >> a.x >> dummy >> a.y >> dummy >> b.x >> dummy >> dummy >> b.y >> dummy >> c.x >> dummy >> c.y >> dummy >> d.x >> dummy >> d.y ) {

		if( (a - b).det(b - c) <= 0 || (b - c).det(c - d) <= 0 || (c - d).det(d - a) <= 0 || (d - a).det(a- b) <= 0 ) {
			cout << "NO" << endl;
		} else {
			cout << "YES" << endl;
 		}
	}
}

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 s = 0.0;
		//rep(i, 4) x[i] += 200, y[i] += 200;
		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 (idx == 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 <complex>
#include <cmath>
using namespace std;

int main()
{
	const double PI = acos(-1);
	double x[4], y[4];
	complex<double> z[4];
	char c;

	while (cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c
				>> x[2] >> c >> y[2] >> c >> x[3] >> c >> y[3]) {

		for (int i = 0; i < 4; i++) {
			z[i].real(x[i]);
			z[i].imag(y[i]);
		}

		bool f = 1;

		for (int i = 0; i < 4; i++) {
			int j = (i + 1) % 4, k = (i + 2) % 4;
			double t = arg((z[k] - z[j]) / (z[j] - z[i]));
			if (!(t >= 0 && t <= PI)) {
				f = 0;
				break;
			}
		}

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

	return 0;
}