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 <complex>
using namespace std;

constexpr double EPS = 1e-10;
using Point = complex<double>;
double cross(Point p, Point q) { return (conj(p) * q).imag(); }

int main() {
    cin.tie(0); ios_base::sync_with_stdio(false);
    double a,b,c,d,e,f,g,h;
    char z;
    while(cin>>a>>z>>b>>z>>c>>z>>d>>z>>e>>z>>f>>z>>g>>z>>h) {
        Point p1(a,b),p2(c,d),p3(e,f),p4(g,h);
        if(cross(p3-p1,p2-p1)*cross(p4-p2,p3-p2) > 0 && cross(p1-p3,p4-p3) * cross(p2-p4, p1-p4) > 0){
            cout << "YES" << '\n';
        } else {
            cout << "NO" << '\n';
        }
    }

    return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
static const double PI=6*asin(0.5);

double x[5],y[5];
char tmp;
double h[6];
double ang[8];//0:bac 1:bca 2:acd 3:cad 4:cba 5:cdb 6:bda 7:dba


int main(){
	while(cin>>x[0]>>tmp>>y[0]){
		bool flag=true;
		rep(i,3){
			cin>>tmp>>x[i+1]>>tmp>>y[i+1];
		}
		x[4] = x[0]; y[4] = y[0];
		rep(i,4){
			double X = x[i+1]-x[i],Y = y[i+1]-y[i];
			h[i] = sqrt(X*X+Y*Y);
			//cout << "h["<<i<<"] = "<<h[i]<<endl;
		}
		//cout<<acos(0.5)<<endl;
		h[4] = sqrt((x[2]-x[0])*(x[2]-x[0])+(y[2]-y[0])*(y[2]-y[0]));
		h[5] = sqrt((x[3]-x[1])*(x[3]-x[1])+(y[3]-y[1])*(y[3]-y[1]));
		ang[0] = acos((h[0]*h[0]+h[4]*h[4]-h[1]*h[1])/(2*h[0]*h[4]));
		ang[1] = acos((h[1]*h[1]+h[4]*h[4]-h[0]*h[0])/(2*h[1]*h[4]));
		ang[2] = acos((h[2]*h[2]+h[4]*h[4]-h[3]*h[3])/(2*h[2]*h[4]));
		ang[3] = acos((h[3]*h[3]+h[4]*h[4]-h[2]*h[2])/(2*h[3]*h[4]));
		ang[4] = acos((h[1]*h[1]+h[5]*h[5]-h[2]*h[2])/(2*h[1]*h[5]));
		ang[5] = acos((h[2]*h[2]+h[5]*h[5]-h[1]*h[1])/(2*h[2]*h[5]));
		ang[6] = acos((h[5]*h[5]+h[3]*h[3]-h[0]*h[0])/(2*h[5]*h[3]));
		ang[7] = acos((h[0]*h[0]+h[5]*h[5]-h[3]*h[3])/(2*h[0]*h[5]));
		//cout << (h[0]*h[0]+h[4]*h[4]-h[1]*h[1])/(2*h[0]*h[4])<<endl;
		//rep(i,4) cout<<ang[i]<<endl;
		//cout<<2*ang[0]<<" "<<PI<<endl;
		if(PI>(ang[0]+ang[3])&&PI>ang[1]+ang[2]){
			
		}
		else{
			flag = false;
		}
		if(PI>(ang[4]+ang[7])&&PI>ang[5]+ang[6]){
		}
		else{
			flag = false;
		}
		if(flag) cout<<"YES\n";
		else cout<<"NO\n";
		
	}
	return 0;
}

C++: #include <iostream>
#include <complex>
using namespace std;
typedef complex<double> P;
const double precision = 1e-10;
bool eql(double a, double b) { return abs(a - b) < precision; }
double cross(P a, P b) { return a.real()*b.imag() - b.real()*a.imag(); }
bool convexp(P a, P b, P c, P d) {
  return (cross(c-a, b-a)*cross(c-a,d-a) < precision)
          && (cross(d-b, a-b)*cross(d-b, c-b) < precision);
}

int main(int argc, char **argv)
{
  double xa, ya, xb, yb, xc, yc, xd, yd;
  char c;
  for (;;) {
    cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd;
    if (cin.eof())
      break;

    if (convexp(P(xa, xa), P(xb, yb), P(xc, yc), P(xd, yd)))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 30;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

bool collision_detection( double x1, double y1, double x2, double y2, double x3, double y3, double xp, double yp ) {
	x2 -= x1;
	x3 -= x1;
	xp -= x1;
	y2 -= y1;
	y3 -= y1;
	yp -= y1;
	double t_size = fabs( ( x2 * y3 - y2 * x3 ) / 2 );
	t_size -= fabs( ( x2 * yp -  y2 * xp ) / 2 );
	t_size -= fabs( ( x3 * yp -  y3 * xp ) / 2 );
	x2 -= xp;
	x3 -= xp;
	y2 -= yp;
	y3 -= yp;
	yp = xp = 0;
	t_size -= fabs( ( x2 * y3 - y2 * x3 ) / 2 );
	return fabs( t_size ) < 1e-10;
}

int main() {
	double x[ 4 ], y[ 4 ];
	while ( ~scanf( "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[ 0 ], &y[ 0 ], &x[ 1 ], &y[ 1 ], &x[ 2 ], &y[ 2 ], &x[ 3 ], &y[ 3 ] ) ) {
		bool print_yes = true;
		for ( int i = 0; i < 4; i++ ) {
			if ( collision_detection( x[ ( i + 1 ) % 4 ], y[ ( i + 1 ) % 4 ], x[ ( i + 2 ) % 4 ], y[ ( i + 2 ) % 4 ], x[ ( i + 3 ) % 4 ], y[ ( i + 3 ) % 4 ], x[ i ], y[ i ] ) ) {
				print_yes = false;
				break;
			}
		}
		printf( "%s\n", print_yes ? "YES" : "NO" );
	}
	return 0;
}