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<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
#include<cmath>
#include<complex>
using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()

double is_X (P p1, P p2, P p3, P p4) {
    return ((p1.X-p2.X) * (p3.Y-p1.Y) + (p1.Y-p2.Y) * (p1.X-p3.X)) * ((p1.X-p2.X) * (p4.Y-p1.Y) + (p1.Y-p2.Y) * (p1.X-p4.X));
}

int main(){
    int mod=1000000007;
    int a,b,c;
    double xa,xb,xc,xd,ya,yb,yc,yd;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF) {
        P a(xa,ya);
        P b(xb,yb);
        P c(xc,yc);
        P d(xd,yd);

        if (is_X(a,b,c,d)>0.0 || is_X(b,d,a,c)>0.0) {
            printf("NO\n");
        } else {
            printf("YES\n");
        }
    }
    return 0;
}

C++: #include<cstdio>
#include<cmath>
#include <stdlib.h>

float spase(float a,float b,float c){
	return sqrt((a+b+c)*(b-a+c)*(a-b+c)*(a+b-c));
}

int main(){
	float a,b,c,d,e,f,g,h,AB,BC,CD,DA,AC,BD,abc,bcd,cda,dab;
	while( scanf("%f,%f,%f,%f,%f,%f,%f,%f",&a,&b,&c,&d,&e,&f,&g,&h) != EOF ){
		AB=sqrt((a-c)*(a-c)+(b-d)*(b-d));
		BC=sqrt((c-e)*(c-e)+(d-f)*(d-f));
		CD=sqrt((e-g)*(e-g)+(f-h)*(f-h));
		DA=sqrt((g-a)*(g-a)+(h-b)*(h-b));
		AC=sqrt((a-e)*(a-e)+(b-f)*(b-f));
		BD=sqrt((c-g)*(c-g)+(d-h)*(d-h));
		abc=((a-c)*(c-e)+(b-d)*(d-f))/AB/BC;
		bcd=((c-e)*(e-g)+(d-f)*(f-h))/BC/CD;
		cda=((e-g)*(g-a)+(f-h)*(h-b))/CD/DA;
		dab=((g-a)*(a-c)+(h-b)*(b-d))/DA/AB;
		//printf("%f %f %f %f\n",abc,bcd,cda,dab);
		//printf("%f %f %f %f\n",acos(abc),acos(bcd),acos(cda),acos(dab));
		abc=acos(abc)+acos(bcd)+acos(cda)+acos(dab);
		//printf("%f %f %f %f\n",abc,2*M_PI,spase(AB,BC,AC)+spase(CD,DA,AC),spase(DA,AB,BD)+spase(CD,BC,BD));
		//printf("%d %d\n",abs(abc-2*M_PI)<0.0001,abs(spase(AB,BC,AC)+spase(CD,DA,AC)-spase(DA,AB,BD)-spase(CD,BC,BD))<0.0001);
		if(((abs(abc-2*M_PI)<0.0001))&&(abs(spase(AB,BC,AC)+spase(CD,DA,AC)-spase(DA,AB,BD)-spase(CD,BC,BD))<0.0001)){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}