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<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
double check(double x1,double y1,double x2,double y2,double x3,double y3);
int main(void){
    double xa,xb,xc,xd,ya,yb,yc,yd;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
        double sq1S=check(xa,ya,xb,yb,xc,yc)+check(xa,ya,xd,yd,xc,yc);
        double sq2S=check(xb,yb,xc,yc,xd,yd)+check(xb,yb,xa,ya,xd,yd);
        if(sq1S==sq2S)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;

	}
	return 0;
}

double check(double x1,double y1,double x2,double y2,double x3,double y3){
    double ab,bc,ca;
    double S,s;
    ab=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    bc=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
    ca=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
    s=0.5*(ab+bc+ca);
    S=sqrt(s*(s-ab)*(s-bc)*(s-ca));
    return S;
}

C++: #include<iostream>
#include<complex>
#include<vector>
using namespace std;
typedef complex < double > P;
typedef vector< P > G;
struct L:public vector< P >{ // L:線分
  L(const P& a,const P& b){push_back(a);push_back(b);}
};
const double EPS = 1e-8;
const double INF = 1e12;
double cross(const P& a,const P& b){
  return imag(conj(a) * b);
}
double dot(const P& a,const P& b){
  return real(conj(a) * b);
}
int ccw(P a,P b,P c){
  b -= a; c -= a;
  if(cross(b,c) > 0) return 1;
  if(cross(b,c) < 0) return -1;
  if(dot(b,c) < 0) return 2; // c--a--b
  if(norm(b) < norm(c)) return -2; // a--b--c
  return 0; // a--c--b
}
bool intersect(const L& s,const L& t){
  return ccw(s[0],s[1],t[0]) * ccw(s[0],s[1],t[1]) <= 0 &&
    ccw(t[0],t[1],s[0]) * ccw(t[0],t[1],s[1]) <= 0;
}
bool isconvex(const G& g){
  return intersect(L(g[0],g[2]),L(g[1],g[3])) && intersect(L(g[1],g[3]),L(g[0],g[2]));
}
int main(){
  double x1,y1,x2,y2,x3,y3,x4,y4;
  char o;
  while(cin >> x1 >> o >> y1 >> o >> x2 >> o >> y2 >> o >> x3 >> o >> y3 >> o >> x4 >> o >> y4){
    G g(4);
    g[0] = P(x1,y1);
    g[1] = P(x2,y2);
    g[2] = P(x3,y3);
    g[3] = P(x4,y4);
    cout << (isconvex(g) ? "YES" : "NO") << endl;
  }
}

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

#define FOR(i,a,b) for(int i=a; i<b; i++)
#define REP(i,n) FOR(i,0,n)

using P=complex<double>;

int main(){
    double x1,y1,x2,y2,x3,y3,x4,y4;
    char c;
    while(cin>>c>>x1>>c>>y1>>c>>x2>>c>>y2
          >>c>>x3>>c>>y3>>c>>x4>>c>>y4){
        P t[4]={P(x1,y1),P(x2,y2),P(x3,y3),P(x4,y4)};
        int ans=0;
        REP(i,4){
            P a=t[(i+1)%4]-t[i];
            P b=t[(i+3)%4]-t[i];
            double angle=arg(a/b);
            ans+=angle>0;
        }
        cout<<(abs(ans)==4||ans==0?"YES":"NO")<<endl;
    }
}

C++: #include <bits/stdc++.h>  

using namespace std;

#define int long long
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[]={0, 0, 1, -1};
const int dx[]={1, -1, 0, 0};

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

const double EPS = 1e-10;

double add(double a, double b) {
	if(abs(a + b) < EPS * (abs(a) + abs(b))) return 0;
	return a + b;
}

struct Point {
	double x, y;
	Point() {}
	Point(double x, double y) : x(x), y(y) {
	}
	Point operator + (Point p) {
		return Point(add(x, p.x), add(y, p.y));
	}
	Point operator - (Point p) {
		return Point(add(x, -p.x), add(y, -p.y));
	}
	Point operator * (double d) {
		return Point(x * d, y * d);
	}
	double dot(Point p) {
		return add(x * p.x, y * p.y);
	}
	double det(Point p) {
		return add(x * p.y, -y * p.x);
	}
};

bool cmp_x(const Point& p, const Point& q) {
	if(p.x != q.x) return p.x < q.x;
	return p.y < q.y;
}

vector<Point> convex_hull(Point *ps, int n) {
	sort(ps, ps + n, cmp_x);
	int k = 0;
	vector<Point> qs(2 * n);

	for(int i = 0; i < n; ++i) {
		while(k > 1 && (qs[k - 1] - qs[k - 2]).det(ps[i] - qs[k - 1]) <= 0) --k;
		qs[k++] = ps[i];
	}
	for(int i = n - 2, t = k; i >= 0; --i) {
		while(k > t && (qs[k - 1] - qs[k - 2]).det(ps[i] - qs[k - 1]) <= 0) --k;
		qs[k++] = ps[i];
	}
	qs.resize(k - 1);
	return qs;
}

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    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) {
        Point p[4];
        for(int i = 0; i < 4; ++i) {
            p[i].x = x[i]; p[i].y = y[i];
        }
        vector<Point> ps = convex_hull(p, 4);
        printf("%s\n", (ps.size() == 4) ? "YES" : "NO");
    }
    return 0;
}

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

// ?????§?¨?????????¨??????
typedef complex<double> P;

//XY??§?¨?
#define X real()
#define Y imag()

// ??´???p1,p2??¨??????p3,p4???????????????
// (n < 0)<=>?????? , (n == 0)<=>??´??????, (n > 0)<=>?????????????????????  
double isIntersect(P p1, P p2, P p3, P p4){  
    return ( (p1.X-p2.X)*(p3.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p3.X)) * ((p1.X-p2.X)*(p4.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p4.X));  
}

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

	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 );
		
		if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
			printf("NO\n");
		}else{
			printf("YES\n");
		}
	}
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

bool check(double X1,double Y1,double X2,double Y2,double X3,double Y3,double X4,double Y4)
{
	return((X1 - X2) * (Y3 - Y1) - (Y1 - Y2) * (X3 - X1)) * ((X1 - X2) *(Y4 - Y1) - (Y1 - Y2) * (X4 - X1)) > 0.0;
}

void solve()
{
	double xa, ya, xb, yb, xc, yc, xd, yd;
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) )
	if(check(xa,ya,xc,yc,xb,yb,xd,yd) || check(xb,yb,xd,yd,xa,ya,xc,yc))
	{
		cout << "NO" << endl;
	}
	else
	{
		cout << "YES" << endl;
	}
}

int main()
{
	solve();
	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]) < 1e-8){
				f = false;
				break;
			}
		}
		if(f) puts("YES");
		else puts("NO");

	}

	return 0;
}