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 <string>
#include <sstream>
#include <vector>
#include <iostream>
using namespace std;

const double EPS=1e-10;
const double INF=1e10;

struct Point {
    double x, y;
    Point(double x=0, double y=0) : x(x), y(y) {}

    Point operator-(const Point &o) const {
        return Point(x-o.x, y-o.y);
    }

    Point operator+(const Point &o) const {
        return Point(x+o.x, y+o.y);
    }

    Point operator*(const double m) const {
        return Point(x*m, y*m);
    }

    double dot(const Point &o) const {
        return x * o.x + y * o.y;
    }
    
    double cross(const Point &o) const {
        return x * o.y - y * o.x;
    }

    double norm() const {
        return dot(*this);
    }
};

int ccw(Point a, Point b, Point c) {
    b = b - a, c = c - a;
    if (b.cross(c) > EPS) return +1;
    if (b.cross(c) < -EPS) return -1;
    if (b.dot(c) < 0) return +2;
    if (b.norm() < c.norm()) return -2;
    return 0;
}

int main() {
    Point a, b, c, d;
    string s;
    while (getline(cin, s)) {
        for (int k = s.find(','); k != string::npos; k = s.find(',')) {
            s[k] = ' ';
        }
        istringstream ss(s);
        ss >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y;
        if (ccw(a, b, c) == ccw(b, c, d) && ccw(b, c, d) == ccw(c, d, a) && ccw(c, d, a) == ccw(d, a, b)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#include "../..//library/unfinished/convex_hull.cpp"

#define fs first
#define sc second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ") 
{ rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

int main() {
	double a, b;
	char c;
	vector<Point> vi;
	while (cin >> a >> c >> b) {
		vi.clear();
		vi.pb(Point(a, b));
		rep(i, 3) {
			cin >> c >> a >> c >> b;
			vi.pb(Point(a, b));
		}

		vector<Point> po = convex_hull(vi, vi.size());
		cout << (po.size() == vi.size() ? "YES" : "NO") << endl;
	}
}

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

using namespace std;

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);
	}
	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 ccw(P a, P b, P c) {
	a = b - a;
	b = b - c;

	if(a.det(b) < 0) {
		return -1;
	} else if(a.det(b) > 0) {
		return 1;
	} else if(a.det(b) == 0) {
		return 0;
	}
}


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 ) {
		int count = 0, ans = 0;
		count += ccw(a, b, c);
		ans += abs(ccw(a, b, c));
		count += ccw(b, c, d);
		ans += abs(ccw(b, c, d));
		count += ccw(c, d, a);
		ans += abs(ccw(c, d, a));
		count += ccw(d, a, b);
		ans += abs(ccw(d, a, b));

		if(abs(count) == ans) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
}

C++: #include <iostream>
#define EPS 1e-10
using namespace std;

struct P{
  double x,y;
};
double det(P&p,P&q,P&r)
{
  return (q.x-p.x)*(r.y - q.y) - (q.y - p.y)*(r.x - q.x); 
}
int main()
{

  P p[4];
  char c;
  while(cin >> p[0].x >>c>> p[0].y){ 
  for(int i = 1 ; i < 4 ; i++ ){
    cin >>c>> p[i].x >>c>> p[i].y;
  }
  int f = 0;
  for(int i = 0 ; i < 4 ; i++ ){
    if(det(p[i%4],p[(i+1)%4],p[(i+2)%4]) < -EPS){
      cout << "NO" << endl;
      f = 1;
      break;
    }
  }
  if(f == 0)cout << "YES" << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
	char trash;
	double x[4], y[4];
	while(cin >> x[0] >> trash >> y[0]){
		double p, q, r;
		for(int i = 1; i < 4; i++){
			cin >> trash >> x[i] >> trash >> y[i];
		}
		p = ((y[1]-y[0])*(x[3]-x[0])/(x[1]-x[0]))+y[0];
		q = ((y[2]-y[1])*(x[3]-x[1])/(x[2]-x[1]))+y[1];
		r = ((y[2]-y[0])*(x[3]-x[0])/(x[2]-x[0]))+y[0];
		if(x[0] == x[2]){
			if(x[0] > x[1]){
				if(x[0] > x[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[0] < x[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else if(x[0] == x[1]){
			if(x[0] > x[2]){
				if(x[0] < x[2]){
					cout << "NO" << endl;
				}
				else{
					if(q > y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[0] > x[2]){
					cout << "NO" << endl;
				}
				else{
					if(q > y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else if(x[1] == x[2]){
			if(x[0] > x[1]){
				if(x[1] > x[3]){
					cout << "NO" << endl;
				}
				else{
					if(p < y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(x[1] < x[3]){
					cout << "NO" << endl;
				}
				else{
					if(p < y[3]){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
		}
		else{
			if(r > y[1]){
				if(r > y[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}
			}
			else{
				if(r < y[3]){
					cout << "NO" << endl;
				}
				else{
					if((p < y[3] && q > y[3]) || (p > y[3] && q < y[3])){
						cout << "YES" << endl;
					}
					else{
						cout << "NO" << endl;
					}
				}	
			}
		}