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;

double theta(int x, int y) {
    double h = sqrt(pow(x,2)+pow(y,2));
    double t = asin(y / h);
    if (x >= 0 && y >= 0)
        return t;
    else if (x < 0 && y >= 0)
        return M_PI - t;
    else if (x < 0 && y < 0)
        return M_PI - t;
    else
        return 2 * M_PI + t;
}

int hoge(double p1[2], double p2[2], double p3[2])
{
    double theta1 = theta(p2[0] - p1[0], p2[1] - p1[1]);
    double theta2 = theta(p3[0] - p1[0], p3[1] - p1[1]);

    if (0 <= theta1 && theta1 <= M_PI)
        if (theta1<=theta2 && theta2 <= theta1 + M_PI)
            return 1;
        else
            return -1;
    else
        if (theta1 <= theta2 || theta2 <= (theta1 - M_PI))
            return 1;
        else
            return -1;
}

int main(void) {
    double p[4][2];
    char c;
    while (cin >> p[0][0]>> c >> p[0][1]) {
        for (int i = 1; i < 4; ++i)
            cin >> c >>  p[i][0] >> c >> p[i][1];

        int sum = 0;
        for (int i = 0; i < 4; ++i)
            sum += hoge(p[i], p[(i+1)%4], p[(i+2)%4]);

        cout << ((sum==4 || sum==-4)? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <utility>
#include <cstdio>
#include <cmath>

using namespace std;

typedef struct{
    float x,y;
} P;

bool judge(P p1,P p2,P p3,P px){
    float s,a,b,c;
    s=0.5*abs((p1.x-p3.x)*(p2.y-p3.y)-(p2.x-p3.x)*(p1.y-p3.y));
    a=0.5*abs((p1.x-px.x)*(p2.y-px.y)-(p2.x-px.x)*(p1.y-px.y));
    b=0.5*abs((p2.x-px.x)*(p3.y-px.y)-(p3.x-px.x)*(p2.y-px.y));
    c=0.5*abs((p3.x-px.x)*(p1.y-px.y)-(p1.x-px.x)*(p3.y-px.y));
    if(s==a+b+c||(s+0.001<=a+b+c&&s-0.001>=a+b+c)){
        return true;
    }
    return false;
}

int main(void){
    P p[4];
    int i;
    bool flag;
    
    while(true){
        flag=true;
        for(i=0;i<4;i++){
            if(scanf("%f,%f,",&p[i].x,&p[i].y)==EOF)return 0;
        }
        if(judge(p[0],p[1],p[2],p[3])==false){
            if(judge(p[1],p[2],p[3],p[0])==false){
                if(judge(p[2],p[3],p[0],p[1])==false){
                    if(judge(p[3],p[0],p[1],p[2])==false){
                        cout<<"YES"<<endl;
                        flag=false;
                    }
                }
            }
        }
        if(flag){
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <stdio.h>

#define EPS 1e-10

int main(void){
	double x1, y1, x2, y2, x3, y3, x4, y4;
	double cp1, cp2, cp3, cp4; // cross product for each angle
	int conv;
	
	while (scanf("%lf,", &x1)!=EOF){
		scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf", &y1, &x2, &y2, &x3, &y3, &x4, &y4);
		conv = 1;
		cp1 = (x2-x1)*(x1-x4) - (y2-y1)*(y1-y4);
		cp2 = (x3-x2)*(x2-x1) - (y3-y2)*(y2-y1);
		cp3 = (x4-x3)*(x3-x2) - (y4-y3)*(y3-y2);
		cp4 = (x1-x4)*(x4-x3) - (y1-y4)*(y4-y3);
		//printf("%f\t%f\t%f\t%f\n", cp1, cp2, cp3, cp4);
		
		if (cp1 * cp2 < -EPS) conv = 0;
		if (cp2 * cp3 < -EPS) conv = 0;
		if (cp3 * cp4 < -EPS) conv = 0;
		if (cp4 * cp1 < -EPS) conv = 0;
		puts(conv?"YES":"NO");
	}
	
	return 0;
}