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 <stdio.h>
#include <math.h>

using namespace std;


int main(){
	double x1,x2,x3,x4,y1,y2,y3,y4,dist1,dist2,dist3,dist4,dist5,dist6;

	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4)!=EOF){
		dist1 = sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
		dist2 = sqrt((x2-x4)*(x2-x4)+(y2-y4)*(y2-y4));
		dist3 = fabs((y2-y4)*x1+(x4-x2)*y1+y2*(x2-x4)-x2*(y2-y4))/(sqrt((y2-y4)*(y2-y4)+(x4-x2)*(x4-x2)));
		dist4 = fabs((y1-y3)*x2+(x3-x1)*y2+y1*(x1-x3)-x1*(y1-y3))/(sqrt((y1-y3)*(y1-y3)+(x3-x1)*(x3-x1)));
		dist5 = fabs((y2-y4)*x3+(x4-x2)*y3+y2*(x2-x4)-x2*(y2-y4))/(sqrt((y2-y4)*(y2-y4)+(x4-x2)*(x4-x2)));
		dist6 = fabs((y1-y3)*x4+(x3-x1)*y4+y1*(x1-x3)-x1*(y1-y3))/(sqrt((y1-y3)*(y1-y3)+(x3-x1)*(x3-x1)));

		if(dist1 < dist3 || dist2 < dist4 || dist1 < dist5 || dist2 < dist6){
			printf("NO\n");
		}else{
			printf("YES\n");
		}
	}

	return 0;
}

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

using namespace std;
double x[4], y[4];
double ab, bc, cd, da, ac, bd;

double len(double x1, double y1, double x2, double y2)
{
    return sqrt(pow(x1-x2, 2.0) + pow(y1-y2, 2.0));
}

// Heron's Formula
double square(double a, double b, double c)
{
    double s = (a + b + c) / 2.0;
    return sqrt(s * (s-a) * (s-b) * (s-c));
}


int main(void)
{
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)) {
        ab = len(x[0],y[0],x[1],y[1]);
        bc = len(x[1],y[1],x[2],y[2]);
        cd = len(x[2],y[2],x[3],y[3]);
        da = len(x[3],y[3],x[1],y[1]);
        ac = len(x[0],y[0],x[2],y[2]);
        bd = len(x[3],y[3],x[1],y[1]);
        double s1,s2,s3,s4;
        s1 = square(ab, bd, da);
        s2 = square(cd, bd, bc);
        s3 = square(ac, cd, da);
        s4 = square(ab, bc, ac);
        double comp1;
        comp1 = (s1+s2) - (s3+s4);

        if(fabs(comp1) <= 0.01)
            puts("YES");
        else
            puts("NO");
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;

const double EPS = 1e-12;

double add(double a, double b) {
	if (abs(a + b) < EPS * (abs(a) + abs(b)))
		return 0;
	return a + b;
}

struct P {
	double x, y;
	P() {};
	P(double x, double y) : x(x), y(y) {
	}

	P operator + (P p) {
		return P(add(x, p.x), add(y, p.y));
	}

	P operator - (P p) {
		return P(add(x, -p.x), add(y, -p.y));
	}

	P operator * (double d) {
		return P(x * d, y * d);
	}

	P operator / (double d) {
		return P(x / d, y / d);
	}

	// 内積
	double dot(P p) {
		return add(x * p.x, y * p.y);
	}

	// 外積
	double det(P p) {
		return add(x * p.y, -y * p.x);
	}
};

// 線分上に点があるか
bool on_seg(P p1, P p2, P q) {
	return (p1 - q).det(p2 - q) == 0 && (p1 - q).dot(p2 - q) <= 0;
}

// 直線と直線の交点
P intersection(P p1, P p2, P q1, P q2) {
	return p1 + (p2 - p1) * ((q2 - q1).det(q1 - p1) / (q2 - q1).det(p2 - p1));
}

// 2直線の直行判定
bool line_orth(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).dot(b1 - b2)) < EPS;
}

// 2直線の平行判定
bool line_paral(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).det(b1 - b2)) < EPS;
}

// 進行方向
int ccw(P a, P b, P c) {
	b = b - a; c = b - c;
	if (b.det(c) > 0)
		return +1;
	else if (b.det(c) < 0)
		return -1;
	return 0;
}

int main(void) {
	string str;
	P p[4];
	while (getline(cin, str)) {
		replace(str.begin(), str.end(), ',', ' ');
		stringstream buf(str);
		for (int i = 0; i < 4; i++) {
			buf >> p[i].x >> p[i].y;
		}

		int cnt = 0, n = 4;
		for (int i = 0; i < 4; i++) {
			int c = ccw(p[i], p[(i+1)%4], p[(i+2)%4]);
			cnt += c;
			n += abs(c) - 1;
		}

		cout << (abs(cnt) == n ? "YES" : "NO") << endl;
	}
}

C++: #include <iostream>

using namespace std;

struct Vector {
        double x;
        double y;
};

bool is_c_inner(double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd) {
    Vector ab = Vector{xb - xa, yb - ya};
    Vector bc = Vector{xc - xb, yc - yb};

    Vector bd = Vector{xd - xb, yd - yb};
    Vector dc = Vector{xc - xd, yc - yd};

    Vector da = Vector{xa - xd, ya - yd};
    Vector ac = Vector{xc - xa, yc - ya};

    double cross_product_1 = ab.x * bc.y - ab.y * bc.x;
    double cross_product_2 = bd.x * dc.y - bd.y * dc.x;
    double cross_product_3 = da.x * ac.y - da.y * ac.x;

    return (cross_product_1 >=  0 && cross_product_2 >=  0 && cross_product_3 >=  0) ||
            (cross_product_1 <=  0 || cross_product_2 <=  0 && cross_product_3 <=  0);
}

int main() {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    string result;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) == 8) {
        if(is_c_inner( xa, ya, xb, yb, xc, yc, xd, yd)
                ) {
            result = "NO"; // no convex
        } else {
            result = "YES"; //convex
        }
        cout << result << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

struct point{
	double x;
	double y;
};

int main(){
	point ten[4];
	while(cin>>ten[0].x){
		scanf(",%lf",&ten[0].y);
		rep(i,3){
			scanf(",%lf,%lf",&ten[i+1].x,&ten[i+1].y);
		}
		double gaiseki[4];
		rep(i,4){
			point vec1,vec2;
			vec1.x = ten[(i+1)%4].x - ten[i].x;
			vec1.y = ten[(i+1)%4].y - ten[i].y;
			vec2.x = ten[(i+2)%4].x - ten[(i+1)%4].x;
			vec2.y = ten[(i+2)%4].y - ten[(i+1)%4].y;
			gaiseki[i] = vec1.x*vec2.y - vec1.y*vec2.x;
		}
		bool neg = false;
		rep(i,4){
			if(gaiseki[i]<=0)neg=true;
		}
		if(neg)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <complex>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef complex<double> P;

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

P ps[4];

bool is() {
    const double sig = cross(ps[1]-ps[0], ps[2]-ps[0]);
    rep (i, 4) {
        const int j = (i+1)%4;
        const int k = (i+2)%4;
        if (cross(ps[j]-ps[i], ps[k]-ps[i])*sig < 0) return false;
    }
    return true;
}

int main() {
    double x[4], y[4];
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
                x, y, x+1, y+1, x+2, y+2, x+3, y+3) != EOF) {
        rep (i, 4) ps[i] = P(x[i], y[i]);
        puts(is() ? "YES" : "NO");
    }
    return 0;
}