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<cstdio>
#include<cmath>

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-b))/DA/AB;
		abc=acos(abc)+acos(bcd)+acos(cda)+acos(dab);
		if(((abc-(float)(2*M_PI))==0)&&((spase(AB,BC,AC)+spase(CD,DA,AC))==(spase(DA,AB,BD)+spase(CD,BC,BD)))){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

typedef complex<double> P;

double cross(P a,P b){
	return imag(a*conj(b));
}

P in(stringstream &cin){
	double x,y;
	if(cin >> x >> y) return P(x,y);
	exit(0);
}

int main(){
	string l;
	while(getline(cin,l)){
		for( auto &&c : l )
			if( c == ',' )
				c = ' ';
		stringstream ss(l);
		P p[6];
		for(int i = 0 ; i < 4 ; i++)
			p[i] = in(ss);
		p[4] = p[0];
		p[5] = p[1];
		int bit = 0;
		for(int i = 0 ; i < 4 ; i++){
			bit |= 1<<(cross(p[i+1]-p[i],p[i+2]-p[i])>0);
		}
		if( bit == 3 ){
			cout << "NO" << endl;
		}else{
			cout << "YES" << endl;
		}
			
		
	}
	
	
}

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

using namespace std;

typedef complex<double> P;

#define EPS (1.0e-11)
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )

double cross(P a, P b) {
    return (a.real() * b.imag() - a.imag() * b.real());
}


int main()
{
    double x[4], y[4];
    char comma;

    while (cin >> x[0] >> comma >> y[0]) {
        for (int i = 1; i < 4; i++) 
            cin >> comma >> x[i] >> comma >> y[i];

        double ck = 1;
        for (int i = 0; i < 4; i++) {
            ck *= cross(P(x[(i + 1) % 4] - x[i], y[(i + 1) % 4] - y[i]), 
                        P(x[(i + 2) % 4] - x[i], y[(i + 2) % 4] - y[i]));
        }
        if (ck > EPS)
            cout << "YES" << endl;
        else 
            cout << "NO" << endl;
    }
    
    return 0;
}

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

int main(){
	double x[4],y[4];
	char c;
	while(cin>>x[1]>>c>>y[1]>>c>>x[2]>>c>>y[2]>>c>>x[3]>>c>>y[3]>>c>>x[4]>>c>>y[4]){
		double a[4],b[4];
		for(int i=0;i<4;i++){
			a[i] = x[(i+1)%4]-x[i];
			b[i] = y[(i+1)%4]-y[i];
		}
		double c[4];
		for(int i=0;i<4;i++) c[i] = a[i]*b[(i+1)%4] - a[(i+1)%4]*b[i];
		int d = 0;
		for(int i=0;i<4;i++) if(c[i]>0.0) d++;
		if(d==4 or d==0) cout << "NO" << endl;
		else cout << "YES" << endl;
	}
}

C++: #include<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

class PointF
{
public:
	double x,y;
PointF(){}
	PointF(int X,int Y)
	{
		x=X;y=Y;
	}
	double fun(PointF p)
	{
		return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
	}
};

PointF point[4];

double ab,ac,ad,bc,bd,cd;

void set()//準備
{
	ab=point[0].fun(point[1]);
	ac=point[0].fun(point[2]);
	ad=point[0].fun(point[3]);
	bc=point[1].fun(point[2]);
	bd=point[1].fun(point[3]);
	cd=point[2].fun(point[3]);
}

double check(double a,double b,double c)
{
	double S=(a+b+c)/2;
	return sqrt(S-a+S-b+S-c);
}

int main()
{
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&point[0].x,&point[0].y,&point[1].x,&point[1].y,&point[2].x,&point[2].y,&point[3].x,&point[3].y)!=EOF)
	{
		set();
		if(check(ab,bc,ac)+check(ac,ad,cd)==check(ab,bd,ad)+check(bc,cd,bd))
		{
			printf("YES\n");
		}
		else printf("NO\n");
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <stdio.h>
#include <math.h>
using namespace std;
int line(double x1,double y1,double x2,double y2,double xp,double yp){
	if(x1!=x2){
		y1=(y2-y1)*(xp-x1)/(x2-x1)+y1;
	}
	if(yp>y1) return 1;
	else return -1;
}
int main(){
	double xa,ya,xb,yb,xc,yc,xd,yd;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
		int a,b,c,d;
		a=line(xb,yb,xd,yd,xa,ya);
		b=line(xa,ya,xc,yc,xb,yb);
		c=line(xb,yb,xd,yd,xc,yc);
		d=line(xa,ya,xc,yc,xd,yd);
		if(a+c==0 && b+d==0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}