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<cfloat>
#include<cassert>
#include<cmath>
#include<vector>
 
using namespace std;
 
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS )
#define dle(a, b) (equals(a, b) || a < b )
static const double PI = acos(-1);
 
class Point{
    public:
    double x, y;
     
    Point ( double x = 0, double y = 0): x(x), y(y){}
     
    Point operator + ( Point p ){ return Point(x + p.x, y + p.y); }
    Point operator - ( Point p ){ return Point(x - p.x, y - p.y); }
    Point operator * ( double a ){ return Point(x*a, y*a); }
    Point operator / ( double a ){ return Point(x/a, y/a); }
 
    double abs() { return sqrt(norm());}
    double norm() { return x*x + y*y; }
 
    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;
    }
};
 
typedef Point Vector;
 
double norm( Vector a ){ return a.x*a.x + a.y*a.y; }
double abs( Vector a ){ return sqrt(norm(a)); }
Point polar( double a, double r ){ return Point(cos(r)*a, sin(r)*a);}
double getDistance( Vector a, Vector b ){ return abs(a - b); }
double dot( Vector a, Vector b ){ return a.x*b.x + a.y*b.y; }
double cross( Vector a, Vector b ){ return a.x*b.y - a.y*b.x; }
 
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
 
// EPS can be 0
// need to check for 920, 833, 866
int ccw( Point p0, Point p1, Point p2 ){
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    if ( cross(a, b) > EPS ) return COUNTER_CLOCKWISE;
    if ( cross(a, b) < -EPS ) return CLOCKWISE;
    if ( dot(a, b) < -EPS ) return ONLINE_BACK;
    if ( norm(a) < norm(b) ) return ONLINE_FRONT;
    return ON_SEGMENT;
}
 
bool isConvex( Point P[4] ){
    int c = ccw(P[0], P[1], P[2]);
    for ( int i = 1; i < 4; i++ ){
    if ( c != ccw(P[i], P[(i+1)%4], P[(i+2)%4] )) return false;
    }
    return true;
}
 
main(){
    char ch;
    Point P[4];
    while( cin >> P[0].x >> ch >> P[0].y ){
    for ( int i = 1; i < 4; i++ ) cin >> ch >> P[i].x >> ch >> P[i].y;
    if ( isConvex(P) ) cout << "YES" << endl;
    else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <stdlib.h>
using namespace std;
vector<string> split(const string &str, char delim){
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos){
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}
bool cal(int i,int j,int l,int k,vector<double> &val){
  double kata = (val[i*2]-val[j*2])/(val[i*2+1]-val[j*2+1]);
  double sen1 = kata*(val[2*l] - val[i*2])+val[i*2+1];
  double sen2 = kata*(val[2*k] - val[i*2])+val[i*2+1];
  if((sen1 - val[2*l+1])*(sen2 - val[2*k+1]) > 0 )return true;
  return false;
}
int main(){
  string str;
  while(cin >> str){
    vector<string> s_v = split(str,',');
    vector<double> val(8);
    for(int i = 0;i < 8;i++){
      val[i] = stod(s_v[i]);
    }
    int flag = 0;
    for(int i = 0;i < 4;i++){
      for(int j = 0;j < 4;j++){
	if(i == j)break;
	for(int k = 0;k < 4;k++){
	  if(i == k || j == k)break;
	  for(int l = 0;l < 4;l++){
	    if(i == l || j == l || k == l)break;
	    if(cal(i,j,k,l,val)){
	      flag = 1;
	    }
	  }
	}
      }
    }
    if(flag)cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}

C++: #include<vector>
#include<algorithm>

#define	EPS		1e-9
#define	pb(a)	push_back(a);

#define	ID_CCW	0
#define	ID_CW	1
#define	ID_GO	2
#define	ID_BACK	3

using namespace std;

class Point{
public:
	double x,y;
	Point(){}
	Point(double xx,double yy) : x(xx),y(yy){}
};

Point &operator -=(Point &a,const Point &b)
{
	a.x-=b.x;
	a.y-=b.y;
	return a;
}

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

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

int ccw(const Point &a,Point b,Point c)
{
	b-=a;
	c-=a;
	double rotdir=cross(b,c);
	if(rotdir>EPS)		return ID_CCW;
	if(rotdir<-EPS)		return ID_CW;
	if(dot(b,c)>EPS)	return ID_GO;
	return ID_BACK;
}

int main()
{
	Point p[4];
	while(1){
		if(scanf("%lf,%lf",&p[0].x,&p[0].y)==EOF)	break;
		for(int i=1;i<4;i++)	scanf(",%lf,%lf",&p[i].x,&p[i].y);
		bool b1=true;
		for(int i=0;i<4;i++)	if(ccw(p[i],p[(i+1)%4],p[(i+2)%4])!=ID_CCW)	b1=false;
		bool b2=true;
		for(int i=0;i<4;i++)	if(ccw(p[i],p[(i+1)%4],p[(i+2)%4])!=ID_CW)	b2=false;
		puts(b1||b2?"YES":"NO");
	}
	return 0;
}

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

// _ÀWð^Æ·é
typedef complex<double> P;
// ÎÌè`
#define PI 3.1415926535898

// e·éë·Ã
#define EPS (1e-10)
//XYÀW
#define X real()
#define Y imag()

//QÂÌdouble^Ìlªµ¢©Ç¤©
bool equal(double a, double b){
	return (fabs( a-b ) < EPS)? true : false ;
}
	
// Op`NX
class Triangle{

private:
	//Op`ÌR_ÌÀW
	P a, b, c;
	//Op`ÌRÓÌ·³
	double edgeA,edgeB,edgeC;
	//Op`ÌRpÌå«³(WA)
	double angleA,angleB,angleC;
	//]·è©çRÂÌpxðßéÖ
	double LawOfCosines(double a,double b, double c){
		return acos( (b*b+c*c-a*a) / (2.0*b*c) );
	}
	

public:
	//RXgN^(RÂÌ_ÆÓÆpxðú»)
	Triangle(P p1, P p2, P p3){
		a = p1;
		b = p2;
		c = p3;
		edgeB = abs(c-a);
		edgeA = abs(b-c);
		edgeC = abs(a-b);
		angleA = LawOfCosines(edgeA,edgeB,edgeC);
		angleB = LawOfCosines(edgeB,edgeC,edgeA);
		angleC = LawOfCosines(edgeC,edgeA,edgeB);
	}
	double getAngleA(){//pAÌpxðÏ¦·
		return angleA;
	}
	double getAngleB(){//pBÌpxðÏ¦·
		return angleB;
	}
	double getAngleC(){//pCÌpxðÏ¦·
		return angleC;
	}
};

int main(){
	double xa, xb, xc, xd, ya, yb, yc, yd, angleA, angleB, angleC, angleD;

	while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF ){
		P a( xa , ya );
		P b( xb , yb );
		P c( xc , yc );
		P d( xd , yd );
		Triangle Tr1(a,b,c);
		Triangle Tr2(a,d,c);
		angleA = Tr1.getAngleA() + Tr2.getAngleA();
		angleC = Tr1.getAngleC() + Tr2.getAngleC();
		angleB = Tr1.getAngleB() ;
		angleD = Tr2.getAngleB() ;
		
		if( angleA<=PI && angleB<=PI && angleC<=PI && angleD<=PI ){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}

	return 0;
}