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 <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

struct vector2D{
  double x;
  double y;
};

vector2D subVector(const vector2D& t1, const vector2D& t2) {
  vector2D ret;
  ret.x = t1.x - t2.x;
  ret.y = t1.y - t2.y;
  return ret;
}

bool hittest(vector2D a, vector2D b, vector2D c, vector2D p) {
  vector2D AB = subVector(b, a);
  vector2D BP = subVector(p, b);

  vector2D BC = subVector(c, b);
  vector2D CP = subVector(p, c);

  vector2D CA = subVector(a, c);
  vector2D AP = subVector(p, a);

  double c1 = AB.x * BP.y - AB.y * BP.x;
  double c2 = BC.x * CP.y - BC.y * CP.x;
  double c3 = CA.x * AP.y - CA.y * AP.x;

  if( ( c1 > 0 && c2 > 0 && c3 > 0 ) || ( c1 < 0 && c2 < 0 && c3 < 0 ) ) {
    return true;
  }

  return false;
}

signed main(void)
{
  vector2D p1, p2, p3, p4;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p1.x,&p1.y,&p2.x,&p2.y,&p3.x,&p3.y,&p4.x,&p4.y)) {
    if(hittest(p1, p2, p3, p4) || hittest(p1, p2, p4, p3) || hittest(p1, p3, p4, p2) || hittest(p2, p3, p4, p1)) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}

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("%f,%f,%f,%f,%f,%f,%f,%f",&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 <bits/stdc++.h>

using namespace std;

class D3
{
public:
	long double x;
	long double y;
	long double z;
	long double EPS;

	//?????????????????????
	D3 ( long double x_ = 0.0 , long double y_ = 0.0 , long double z_ = 0.0 )
	{
		EPS = 1e-9;
		x = x_;
		y = y_;
		z = z_;
	}

	//??????
	D3 Cross_product ( D3 partner )
	{
		D3 ret ( y*partner.z - z*partner.y , z*partner.x - x*partner.z , x*partner.y - y*partner.x );
		return ret;
	}

	//??????
	double Inner_product ( D3 partner )
	{
		return x*partner.x + y*partner.y + z*partner.z;
	}

	//?????????????????????????????????
	D3 Make_vector ( D3 partner )
	{
		D3 ret ( partner.x - x , partner.y - y , partner.z - z );
		return ret;
	}

	//???????§????2????????????????????¢???????±???????
	double S_vec ( D3 A , D3 B )
	{
		D3 G;
		G = A.Cross_product ( B );
		return sqrt ( G.Inner_product ( G ) ) / 2;
	}

	//??????????????¢???????±???????
	double S_point ( D3 A , D3 B , D3 C )
	{
		return S_vec ( A.Make_vector ( B ) , A.Make_vector ( C ) );
	}

	//???????§????3????????????????????????????±???????
	double V_vec ( D3 A , D3 B , D3 C )
	{
		D3 G;
		G = A.Cross_product ( B );
		return G.Inner_product ( C ) / 6;
	}

	//4???????????????????±???????
	double V_point ( D3 A , D3 B , D3 C , D3 D )
	{
		return V_vec ( A.Make_vector ( B ) , A.Make_vector ( C ) , A.Make_vector ( D ) );
	}

	D3 operator+( D3 partner )
	{
		return D3 ( x + partner.x , y + partner.y , z + partner.z );
	}

	D3 operator-( D3 partner )
	{
		return D3 ( x - partner.x , y - partner.y , z - partner.z );
	}

	D3 operator*( D3 partner )
	{
		return D3 ( x * partner.x , y * partner.y , z * partner.z );
	}

	D3 operator/( D3 partner )
	{
		return D3 ( x / partner.x , y / partner.y , z / partner.z );
	}

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

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

	bool operator==( D3 partner )
	{
		return abs ( x - partner.x ) < EPS&&abs ( y == partner.y ) < EPS&&abs ( z == partner.z ) < EPS;
	}

	double length ()
	{
		return sqrt ( x*x + y*y + z*z );
	}

	//???????????????????????????
	//????????¨???
	D3 Unit_vec ()
	{
		return D3 ( *this ) / ( *this ).length ();
	}

	//????????????????????????
	D3 Inverse_vec ()
	{
		return D3 ( *this )*-1.;
	}

	//?????´????????????
	bool Vertical ( D3 partner )
	{
		return ( *this ).Inner_product ( partner ) == 0;
	}

	//??????????????????
	bool Parallel ( D3 partner )
	{
		return ( *this ).Unit_vec () == partner.Unit_vec () || ( *this ).Unit_vec ().Inverse_vec () == partner.Unit_vec ();
	}

};

int main ()
{
	long double xa , ya , xb , yb , xc , yc , xd , yd;
	char c;
	while( cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd )
	{
		D3 A ( xa , ya ) , B ( xb , yb ) , C ( xc , yc ) , D ( xd , yd );
		D3 calc;
		if( calc.S_point ( A , B , C ) + calc.S_point ( A , D , C ) == calc.S_point ( B , A , D ) + calc.S_point ( B , C , D ) )
		{
			cout << "YES" << endl;
		} else
		{
			cout << "NO" << endl;
		}
	}
}

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

// !!! EPS は 1e-10 !!!
#define EPS (1e-10)
static const double PI = M_PI;
 
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 k ) { return Point(k*x, k*y); }
  Point operator/ ( double k ) { return Point(x/k, y/k); }
 
  double abs() { return sqrt(norm()); }
  double norm() { return x*x+y*y; }
};
 
typedef Point Vector;
 
double norm( Vector a ) { return a.x*a.x + a.y*a.y; }
double abs( Vector a ) { return sqrt(norm(a)); }
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; }
 
enum { COUNTER_CLOCKWISE, CLOCKWISE, ONLINE_BACK, ONLINE_FRONT, ON_SEGMENT };
 
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(vector<Point> P) {
  int N = P.size();
  if(P.size() < 3) return false; // 三角形を作れないなら false を返す
  int c = ccw(P[0], P[1], P[2]);
  for(int i=1; i<N; i++) {
    if( c != ccw(P[i], P[(i+1)%N], P[(i+2)%N]) ) return false;
  }
  return true;
}
 
int main() {
  char ch;
  vector<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;
}