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 <cstdio>
#include <complex>
#include <vector>

using namespace std;

typedef complex<double> P;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

int main(){
    P ps[4];
    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]) != EOF){

        rep(i,4) ps[i] = P(x[i],y[i]);
        double ts[4];
        
        rep(i,4){
            P a = ps[i], b = ps[(i+1)%4], c = ps[(i+2)%4];
            a-=b; c-=b;
            double t = arg(a/c);
            ts[i]=t;
        }

        bool ok = true;
        rep(i,4){
            //cout << ts[i] << endl;
            if(ts[0]*ts[i]<0) ok = false;
        }

        if(ok) puts("YES");
        else puts("NO");
    }
}

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;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;
inline int toInt(string s){int v;istringstream i(s);i>>v;return v;}
template<class T> inline string toString(T x){ostringstream o;o<<x;return o.str();}
template<class T> void pv(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}
const int INF = 1000000000;
const double PI = acos(-1.0), EPS = 1e-10;

typedef complex<double> P;

double CROSS(const P& a, const P& b) {
	return imag(conj(a) * b);
}

int CCW(const P& a, const P& b) {
	if(CROSS(a, b) > EPS) return 1;
	if(CROSS(a, b) < -EPS) return -1;
	return 0;
}

int main() {
	vector<P> v(4);
	for(string line; getline(cin, line);) {
		rep(i,line.length()) if(line[i] == ',') line[i] = ' ';
		istringstream is(line);
		for(int i = 0; i < 4; i++) {
			is >> v[i].real() >> v[i].imag();
		}

		int ccw[4];
		
		for(int i = 0; i < 4; i++) {
			int cur = i % 4;
			int nc = (i + 1) % 4;
			int nnc = (i + 2) % 4;
			ccw[i] = CCW(v[nc] - v[cur], v[nnc] - v[nc]);
		}
		
#if 0
		debug(v[0]);
		debug(v[1]);
		debug(v[2]);
		debug(v[3]);
#endif

#if 0
		debug(ccw[0]);
		debug(ccw[1]);
		debug(ccw[2]);
		debug(ccw[3]);
#endif
		
		bool f = true;
		for(int i = 0; i < 4; i++) {
			if(ccw[i] != ccw[(i+1)%4]) f = false;
		}
		
		cout << (f ? "YES" : "NO") << endl;
	}
	return 0;
}

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;

typedef complex<double> P;
double sq(double x){return x*x;}

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

int main(){
	double x[4],y[4];
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)){
		P p[4];
		for (int i = 0; i < 4; i++)
			p[i] = P(x[i],y[i]);
		bool f = true;
		for (int i = 0; i < 4; i++)
		{
			if(cross(p[(i+2)&3] - p[(i+1)&3],p[i] - p[(i+1)&3]) < 0)
				f = false;
		}
		if(f) puts("YES");
		else puts("NO");

	}

	return 0;
}

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

#define scanf scanf_s

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;
}