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<float.h>
using namespace std;

int main(){
    double pos[4][2];
    double slope[4];
    bool zero[4];
    double temp;
    int lors;
    bool result;
    int i, j;
    char comma;
    while(cin >> pos[0][0]){
        cin >> comma >> pos[0][1];
        for(i=1;i<4;i++){
            for(j=0;j<2;j++){
                cin >> comma >> pos[i][j];
            }
        }
        for(i=0;i<4;i++){
            temp = pos[i%4][0] - pos[(i+1)%4][0];
            if(temp == 0){
                slope[i] = DBL_MAX;
                zero[i] = true;
            }else{
                slope[i] = (pos[i%4][1] - pos[(i+1)%4][1])/temp;
                zero[i] = false;
            }
        }
        result = true;
        for(i=0;i<2;i++){
            if(slope[0] > slope[1]){
                lors = 0;
            }else{
                lors = 1;
            }
            for(j=1;j<4;j++){
                if(slope[j%4] > slope[(j+1)%4] && !lors){
                    result = false;
                    break;
                }else if(slope[j%4] < slope[(j+1)%4] && lors){
                    result = false;
                    break;
                }else{
                    lors = 1 - lors;
                }
            }
            for(j=0;j<4;j++){
                if(zero[j]){
                    slope[j] = DBL_MIN;
                }
            }
        }
        if(result){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

class Point{
public:
	Point();
	Point(double _x, double _y);
	double x, y;
};

Point::Point() : x(0), y(0){}
Point::Point(double _x, double _y) : x(_x), y(_y){}

class Vector{
	//private:

public:
	Vector();
	Vector(double _x, double _y);
	Vector(Point p1, Point p2);
	double x, y;
};

Vector::Vector() : x(0), y(0){}
Vector::Vector(double _x, double _y) : x(_x), y(_y){}
Vector::Vector(Point p1, Point p2) : x(p1.x-p2.x), y(p1.y-p2.y){}

class Triangle{
public:
	Triangle();
	Triangle(Point _p1, Point _p2, Point _p3);
	Point p[3];
};

Triangle::Triangle(Point _p1, Point _p2, Point _p3){
	p[0] = _p1, p[1] = _p2, p[2] = _p3;
}

int extproduct(Vector v1, Vector v2){
	return v1.x*v2.y - v1.y*v2.x;
}

bool triangle_contains(Triangle t, Point p){
	int count = 0;
	for(int i=0;i<3;i++){
		Vector a = Vector(t.p[i], t.p[(i+1)%3]), b = Vector(p, t.p[i]);
		if(extproduct(a, b) > 0)count++;
		else count--;
	}
	return (count%3 != 0);
}

int main(){
	Point ps[4];
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ps[0].x, &ps[0].y, &ps[1].x, &ps[1].y, &ps[2].x, &ps[2].y, &ps[3].x, &ps[3].y)){
		int i = 0;
		for(;i<4;i++){
			if(triangle_contains(Triangle(ps[(i+1)%4], ps[(i+2)%4], ps[(i+3)%4]), ps[i]) == false)break;
		}
		if(i == 4)puts("YES");
		else puts("NO");
	}
}

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

struct p {
	double x;
	double y;
};

int check(struct p a,struct p b,struct p c,struct p d) {
	if (((a.x-b.x)*(c.y-a.y)+(a.y-b.y)*(a.x-c.x)) *
		((a.x-b.x)*(d.y-a.y)+(a.y-b.y)+(a.x-d.x))) {
		return 1;
	}
	return 0;
}

int main() {
	double x1, x2, x3, x4, y1, y2, y3, y4;
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF) {
		p a, b, c, d;
		a.x = x1, a.y = y1;
		b.x = x2, b.y = y2;
		c.x = x3, c.y = y3;
		d.x = x4, d.y = y4;

		if (check(a,c,b,d) && check(b,d,a,c)) {
			cout << "NO";
		}else {
			cout << "YES";
		}
		cout << endl;
	}
	return 0;
}

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) != 0) {
        if(is_c_inner( xa, ya, xb, yb, xc, yc, xd, yd)
                || is_c_inner(xb, yb, xc, yc, xd, yd, xa, ya)
                || is_c_inner(xc, yc, xd, yd, xa, ya, xb, yb)
                || is_c_inner(xd, yd, xa, ya, xb, yb, xc, yc)
                ) {
            result = "NO"; // no convex
        } else {
            result = "YES"; //convex
        }
        cout << result << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<complex>
#define eps 10e-9
using namespace std;
typedef complex<double> p;

double cross(p x,p y)
{
	return x.real()*y.imag()-x.imag()*y.real();
}

int main()
{
	p a,b,c,d;
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a.real(),&a.imag(),&b.real(),&b.imag(),&c.real(),&c.imag(),&d.real(),&d.imag())!=EOF) 
	{
		double tmp=1;
		tmp*=cross(b-a,d-a);
		bool flag=true;
		if(tmp*cross(c-b,a-b)<-eps||tmp*cross(d-c,b-c)<-eps||tmp*cross(a-d,c-d)<-eps) flag=false;
		cout<<(flag?"YES":"NO")<<endl;
	}
  return 0;
}

C++: #define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
using namespace std;
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){
		double a=999999,b=999999,c=999999,d=999999;
		
		if(xb!=xa)
		a=(yb-ya)/(xb-xa);
		if(xc!=xd)
		b=(yc-yd)/(xc-xd);
		if(xc!=xb)
		c=(yc-yb)/(xc-xb);
		if(xd!=xa)
		d=(yd-ya)/(xd-xa);
		
	
		if(a==b&&c==d)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}