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

C++: #include <iostream>

struct vector2 {
    double x, y;
};

bool is_inner_triangle(const vector2 &p, const vector2 &t1, const vector2 &t2, const vector2 &t3)
{
    vector2 p1 = { t1.x - p.x, t1.y - p.y }, p2 = { t2.x - p.x, t2.y - p.y }, p3 = { t3.x - p.x, t3.y - p.y };
    return (p1.x * p2.y - p1.y * p2.x < 0 && p2.x * p3.y - p2.y * p3.x < 0 && p3.x * p1.y - p3.y * p1.x < 0)
        || (p1.x * p2.y - p1.y * p2.x > 0 && p2.x * p3.y - p2.y * p3.x > 0 && p3.x * p1.y - p3.y * p1.x > 0);
}

int main()
{
    while (true) {
        vector2 p[4];
        char comma;
        std::cin >> p[0].x >> comma >> p[0].y;
        for (int i = 1; i < 4; ++i) std::cin >> comma >> p[i].x >> comma >> p[i].y;
        if (std::cin.eof()) break;

        if (is_inner_triangle(p[0], p[1], p[2], p[3]) || is_inner_triangle(p[1], p[2], p[3], p[0])
                || is_inner_triangle(p[2], p[3], p[0], p[1]) || is_inner_triangle(p[3], p[0], p[1], p[2]))
            std::cout << "NO" << std::endl;
        else
            std::cout << "YES" << std::endl;
    }
}

C++: #include <bits/stdc++.h>

using namespace std;

#define EPS 1e-10

struct Point {
    double x, y;

    Point(){}
    Point(double x, double y) : x(x), y(y) {}

    Point operator + (const Point &p)const{ return Point(x+p.x,y+p.y); }
    Point operator - (const Point &p)const{ return Point(x-p.x,y-p.y); }
    Point operator * (const double &k)const{ return Point(x*k,y*k); }
};

double dot(const Point &a, const Point &b)
{
    return a.x * b.x + a.y * b.y;
}

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

double norm(const Point &p)
{
    return dot(p, p);
}

#define COUNTER_CLOCKWISE +1
#define CLOCKWISE         -1
#define ONLINE_BACK       +2
#define ONLINE_FRONT      -2
#define ON_SEGMENT        +0
typedef Point Vector;

int ccw(const Point &p0, const Point &p1, const Point &p2)
{
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    if (cross(a, b) > EPS) return COUNTER_CLOCKWISE;
    if (cross(a, b) < -EPS) return CLOCKWISE;
    if (dot(a, b) < -EPS) return ONLINE_BACK;
    if (norm(a) < norm(b)) return ONLINE_FRONT;
    return ON_SEGMENT;
}

typedef vector<Point> Polygon;

bool sortY(Point p1, Point p2)
{
    if (p1.y != p2.y) {
	return (p1.y - p2.y < -EPS);
    } else { 
	return (p1.x - p2.x < -EPS);
    }
}

Polygon convex_hull(Polygon &ps)
{
    int N = ps.size(), j = 0;
    Polygon pg(N*2);
    sort(ps.begin(), ps.end(), sortY);
    for (int i = 0; i < N; i++, j++) {
	while (j >= 2 && ccw(pg[j-2], pg[j-1], ps[i]) == -1) {
	    j--;
	}
	pg[j] = ps[i];
    }
    int k = j+1;
    for (int i = N-2; i >= 0; i--, j++) {
	while (j >= k && ccw(pg[j-2], pg[j-1], ps[i]) == -1) {
	    j--;
	}
	pg[j] = ps[i];
    }
    pg.resize(j-1);
    return pg;
}

int main()
{
    Polygon pg(4);
    char c;
    while (cin >> pg[0].x >> c >> pg[0].y) {
        for (int i = 1; i < 4; i++) {
            cin >> c >> pg[i].x >> c >> pg[i].y;
        }
        cout << (convex_hull(pg).size() == 4 ? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

struct Point{
	double x,y;
	Point operator - (const Point a){
		x-=a.x;
		y-=a.y;
		return *this;
	}
};

typedef Point Vector;

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

Vector v[4];

int main(){
	while (1){
		if (scanf("%lf,%lf,",&v[0].x,&v[0].y)==EOF) break;
		FOR(i,1,4){
			scanf("%lf,%lf,",&v[i].x,&v[i].y);
		}
		bool flg=true;
		REP(i,4){
			if (cross(v[(i+1)%4]-v[i],v[(i+2)%4]-v[i])<0) flg=false;
		}
		if (flg){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
	float xa, ya, xb, yb, xc, yc, xd, yd;
	
	while(scanf("%f,%f,%f,%f,%f,%f,%f,%f", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF){
		float x[4] = {xa,xb,xc,xd};
		float y[4] = {ya,yb,yc,yd};
		float s[4];
		bool allp = true, alln = true;
		
		
		for(int i = 0; i < 4; ++i){
			s[i] = (x[(i+1)%4] - x[i]) * (y[(i+2)%4] - y[(i+1)%4]) - (x[(i+2)%4] - x[(i+1)%4]) * (y[(i+1)%4] - y[i]);
		}
		
		for(int i = 0; i < 4; ++i){
			if(s[i] < 0){
				allp = false;
				break;
			}
		}
		for(int i = 0; i < 4; ++i){
			if(s[i] > 0){
				alln = false;
				break;
			}
		}
		
		if(allp || alln){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}