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<algorithm>
using namespace std;
double x[3],y[3];
bool isin(double px,double py){
    bool ok=true;
        for(int i=0;i<3;i++){
            bool plus=false;
            if(x[(i+1)%3]==x[(i+2)%3]){
                if(x[i]>x[(i+1)%3])plus=true;
            }
            else{
                double a,b;
                a=(x[i]-x[(i+1)%3])*(y[(i+2)%3]-y[(i+1)%3]);
                b=(y[i]-y[(i+1)%3])*(x[(i+2)%3]-x[(i+1)%3]);
                if(a>b)plus=true;
            }
            bool pnt=false;
            if(x[(i+1)%3]==x[(i+2)%3]){
                if(px>x[(i+1)%3])pnt=true;
            }
            else{
                double a,b;
                a=(px-x[(i+1)%3])*(y[(i+2)%3]-y[(i+1)%3]);
                b=(py-y[(i+1)%3])*(x[(i+2)%3]-x[(i+1)%3]);
                if(a>b)pnt=true;
            }
            if(pnt!=plus)ok=false;
        }
        if(ok)return true;
        else return false;
}
int main(){
	char z;
	double xx[4],yy[4];
	while(cin>>xx[0]>>z>>yy[0]){
		for(int i=1;i<4;i++)cin>>z>>xx[i]>>z>>yy[i];
		bool ok=true;
		for(int i=0;i<4;i++){
			for(int j=0;j<3;j++)x[j]=xx[j],y[j]=yy[j];
			if(isin(xx[3],yy[3]))ok=false;
			double kx=xx[3],ky=yy[3];
			for(int j=0;j<3;j++)xx[j+1]=x[j],yy[j+1]=y[j];
			xx[0]=kx,yy[0]=ky;
		}
		if(ok)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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

int main()
{
    double ax,ay,bx,by,cx,cy,dx,dy;
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy))
	{
        if(((ax-cx)*(by-ay)+(ay-cy)*(ax-bx))*((ax-cx)*(dy-ay)+(ay-cy)*(ax-dx))<=0&& ((bx-dx)*(ay-by)+(by-dy)*(bx-ax))*((bx-dx)*(cy-by)+(by-dy)*(bx-cx))<=0)
			cout<<"Yes"<<endl;
        else cout<<"No"<<endl
    }
}

C++: #include <cstdio>
#include <iostream>
#include <complex>

using namespace std;

#define X real()
#define Y imag()
typedef double D;
typedef complex<D> P;
#define EPS (1e-9)

inline D inprd(const P &a, const P &b){ return (conj(a) * b).X; }
inline D outprd(const P &a, const P &b){ return (conj(a) * b).Y; }
inline D sign(D d){ return (d<0)?-1:d>0?1:0; }

int main(){
    string s;
    while(getline(cin, s)){
        double xa,ya,xb,yb,xc,yc,xd,yd;
        sscanf(s.c_str(), "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd); 
        P a(xa,ya), b(xb,yb), c(xc,yc), d(xd,yd);

        double sa = sign(outprd(b-a, d-a));
        double sb = sign(outprd(c-b, a-b));
        double sc = sign(outprd(d-c, b-c));
        double sd = sign(outprd(a-d, c-d));
        if(sa == sb && sb == sc && sc == sd){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}