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 <complex>

using namespace std;

typedef complex<double> P;

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

int ccw(P a, P b, P c)
{
    b -= a;
    c -= a;
    if (cross(b, c) > 0)   return +1; // counter clockwise
    if (cross(b, c) < 0)   return -1; // clockwise
    // if (dot(b, c) < 0)     return +2; // c--a--b on line
    // if (norm(b) < norm(c)) return -2; // a--b--c on line
    return 0;
}

int main()
{
    for (;;) {
        P p[4];
        double x, y;
        if (scanf("%lf,%lf,", &x, &y) == EOF)
            break;
        p[0] = P(x, y);
        scanf("%lf,%lf,", &x, &y);
        p[1] = P(x, y);
        scanf("%lf,%lf,", &x, &y);
        p[2] = P(x, y);
        scanf("%lf,%lf,", &x, &y);
        p[3] = P(x, y);

        int sign = ccw(p[0], p[1], p[2]);
        if (ccw(p[1], p[2], p[3]) == sign
                && ccw(p[2], p[3], p[0]) == sign
                && ccw(p[3], p[0], p[1]) == sign)
            puts("YES");
        else
            puts("NO");
    }

    return 0;
}

C++: //0035 s it Convex

//http://www5d.biglobe.ne.jp/~tomoya03/shtml/algorithm/Intersection.htm ±±©çl¦qØ

#include<iostream>
using namespace std;

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

inline double AngleFromLine(const Point &p1, const Point &p2, const Point &to)
{
	//(x1-x2)*(y-y1)+(y1-y2)*(x1-x)=0@ª¼üÌ®
	return ((p1.x-p2.x)*(to.y-p1.y)+(p1.y-p2.y)*(p1.x-to.x));
}

int main(void)
{
	const int N = 4;
	while(1)
	{
		Point p[N];
		char dummy;
		int i;
		for(i = 0; i < N; i++)
		{
			if(i)
				cin >> dummy;
			cin >> p[i].x >> dummy >> p[i].y;
		}
		if(!cin)
			break;

		double last = 0;	//OñÌü«»èÌÊ@0Í¼üó¾©ç¡ñÌâèÅÍ¶ÝµÈ¢
		double current;
		bool isConvex = true;	//ÊH
		for(i = 0; i < N; i++)
		{
			current = AngleFromLine(p[i], p[(i+1)%N], p[(i+2)%N]);
			//OñÆü«ªá¦ÎAÏÍ}CiXÉÈé
			if(last * current < 0)
			{
				isConvex = false;
				break;
			}
			last = current;
		}

		cout << (isConvex ? "YES": "NO") << endl;
	}
	return 0;
}

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

double eps = 1e-10;

class Point {
public:
	double x, y;
	
	Point(double x = 0, double y = 0) : x(x), y(y) {}
	
	Point operator + (const Point& p) {
		return Point(x + p.x, y + p.y);
	}
	Point operator - (const Point& p) {
		return Point(x - p.x, y - p.y);
	}
	Point operator * (const double& a) {
		return Point(x * a, y * a);
	}
	Point operator / (const double& a) {
		return Point(x / a, y / a);
	}
	
	bool operator < (const Point& p) const {
		return x != p.x ? x < p.x : y < p.y;
	}
	bool operator == (const Point& p) const {
		return fabs(x - p.x) < eps && fabs(y - p.y) < eps;
	}
	
	double abs() {
		return sqrt(norm());
	}
	double norm() {
		return x * x + y * y;
	}
	
};

class Circle {
public:
	Point c;
	double r;
	Circle(Point c = Point(), double r = 0.0) : c(c), r(r) {}
};

typedef Point Vector;

struct Segment {
	Point p1, p2;
	Segment(Point p1, Point p2) : p1(p1), p2(p2) {}
};

typedef Segment Line;

// ????????????
bool equals(const double& a, const double& b) {
	return fabs(a - b) < eps;
}

// ??????
double dot(const Vector& a, const Vector& b){
	return a.x * b.x + a.y * b.y;	
}

// ??????
double cross(const Vector& a, const Vector& b){
	return a.x * b.y - a.y * b.x;
}

class Triangle {
public:
	Point p1, p2, p3; // ??????
	Vector v1, v2, v3; // ??????????????????
	double e1, e2, e3; // ????????§??????
	double a1, a2, a3; // ?§????(????????¢???)
	
	Triangle(Point a, Point b, Point c) : p1(a), p2(b), p3(c) {
		v1 = p3 - p2; v2 = p3 - p1; v3 = p2 - p1;
		e1 = v1.abs(); e2 = v2.abs(); e3 = v3.abs();
		a1 = law_of_cosines(e1, e2, e3); a2 = law_of_cosines(e2, e1, e3);
		a3 = law_of_cosines(e3, e2, e1);
	}
	
	// ????????????(?????????:?§????)
	double law_of_cosines(const double& a, const double& b, const double& c) { 
		return acos((b * b + c * c - a * a) / (2.0 * b * c)) * 180 / M_PI;
	}
	
	// ?????\????????????
	double calc_radius_circumcenter() {
		return e1 / (2.0 * sin(a1));
	}
	// ?????????????????????
	Vector calc_vec_circumcenter() {
		return (v1 * sin(2.0 * a1) + v2 * sin(2.0 * a2) + v3 * sin(2.0 * a3))
		       / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3));
	}
	
	// ???????????§?¨?
	Point calc_p_circumcenter() {
		return Point((p1.x * sin(2.0 * a1) + p2.x * sin(2.0 * a2) + p3.x * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)),
		             (p1.y * sin(2.0 * a1) + p2.y * sin(2.0 * a2) + p3.y * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)));
	}
};

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){
		Triangle t1 = Triangle(Point(x1, y1), Point(x2, y2), Point(x4, y4));
		Triangle t2 = Triangle(Point(x2, y2), Point(x1, y1), Point(x3, y3));
		Triangle t3 = Triangle(Point(x3, y3), Point(x2, y2), Point(x4, y4));
		Triangle t4 = Triangle(Point(x4, y4), Point(x3, y3), Point(x1, y1));
		//cout << t1.a1 << " " << t2.a1 << " " << t3.a1 << " " << t4.a1 << endl;
		double maxt = max(t1.a1, max(t2.a1, max(t3.a1, t4.a1)));
		if(fabs(maxt - (t1.a1 + t2.a1 + t3.a1 + t4.a1 - maxt)) < eps)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	return 0;
}

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

int main(){
	double a,b,c,d,e,f,g,h,AB,BC,CD,DA,abc,bcd,cda,dab;
	while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&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));
		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;
		if( ( (abc>=0)&&(bcd>=0)&&(cda>=0)&&(dab>=0) )||( (abc<0)&&(bcd<0)&&(cda<0)&&(dab<0) ) ){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
struct P{
  double x,y;
  P(){}
  P(double x,double y):x(x),y(y){}
  P operator - (P p){
    return P(x - p.x,y - p.y);
  }
  double det(P p){
    return x*p.y - y*p.x;
  }
};
int main(){
  P a[4];
  char e;
  while( cin >> a[0].x >> e >> a[0].y){
    int flag = 1;
    for(int i = 1 ; i < 4 ; i++ ){
      cin >> e >> a[i].x >> e >>  a[i].y;
    }
    for(int i = 0 ; i < 4 ; i++ ){
      if((a[(i + 1)%4] - a[i]).det( a[(i + 2)%4] - a[(i + 1)%4] ) <= 0){
	cout << "NO" << endl;
	flag = 0;
	break;
      }
    }
    if(flag)cout << "YES" << endl;
  }
}