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<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

//???????????????????????????????§?(cos??)????±???????
double arg(double vx,double vy,double ux,double uy)
{
  double v=sqrt(vx*vx+vy*vy);//????????????v?????§??????
  double u=sqrt(ux*ux+uy*uy);//????????????u?????§??????

  double product=vx*vy+ux*uy;//????????????u??¨????????????v?????????

    return product/v/u;

}

int main()
{
  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)!=EOF){

    if(arg(xb-xa,yb-ya,xd-xa,yd-ya)<0)//cosA<0
      cout<<"NO"<<endl;

    else if(arg(xc-xb,yc-yb,xa-xb,ya-yb)<0)//cosB<0
      cout<<"NO"<<endl;

    else if(arg(xd-xc,yd-yc,xb-xc,yb-yc)<0)//cosC<0
      cout<<"NO"<<endl;

    else if(arg(xc-xd,yc-yd,xa-xd,ya-yd)<0)//cosD<0
      cout<<"NO"<<endl;

    else
      cout<<"YES"<<endl;

  }
}

C++: #include<iostream>

using namespace std;

struct point{
	double x;
	double y;
};

istream& operator >> ( istream& s , point& p )
{
	return s >> p.x >> p.y;
}

bool get_convex( const point& a , const point& b , const point& c , const point& d )
{
	point a_c, a_b, a_d;
	point b_d, b_a, b_c;

	a_c.x = c.x-a.x; a_c.y = c.y-a.y;
	a_b.x = b.x-a.x; a_b.y = b.y-a.y;
	a_d.x = d.x-a.x; a_d.y = d.y-a.y;
	b_d.x = d.x-b.x; b_d.y = d.y-b.y;
	b_a.x = a.x-b.x; b_a.y = a.y-b.y;
	b_c.x = c.x-b.x; b_c.y = c.y-b.y;

	bool result_a, result_b;

	result_a = ( ( a_c.x * a_b.y - a_b.x * a_c.y ) * ( a_c.x * a_d.y - a_d.x * a_c.y ) < 0 );
	result_b = ( ( b_d.x * b_a.y - b_a.x * b_d.y ) * ( b_d.x * b_c.y - b_c.x * b_d.y ) < 0 );

	if( result_a == true && result_b == true ) return true;
	else return false;
}

int main(void)
{
	point a, b, c, d;

	while(1)
	{
		cin >> a >> b >> c >> d;
		if( cin.eof() ) break;
		if( get_convex( a , b , c , d ) ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

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

#define EPS (1e-10)

double len(double x1, double y1, double x2, double y2){
	return sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
}
double heron(double a, double b, double c){
	double z = (a+b+c) / 2.0;
	return sqrt(z*(z-a)*(z-b)*(z-c));
}

int main(){
	double x0, x1, x2, x3, y0 ,y1 ,y2, y3;
	double ab, bc, cd ,da, ca, db, abc, bcd, cda, dab, maxS;
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3)){
		ab = len(x0,y0,x1,y1);
		bc = len(x1,y1,x2,y2);
		cd = len(x2,y2,x3,y3);
		da = len(x3,y3,x0,y0);
		ca = len(x0,y0,x2,y2);
		db = len(x1,y1,x3,y3);
		abc = heron(ab, bc, ca);
		bcd = heron(bc, cd, db); 
		cda = heron(cd, da, ca);
		dab = heron(da, ab, db);
		maxS = max(max(abc, bcd), max(cda, dab));
		
		if(fabs(maxS*2.0 - (abc+bcd+cda+dab)) < EPS){
			cout << "NO" << endl;
		}else{
			cout << "YES" << endl; 
		}
	}
	return 0;
}

C++: //#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

// ???
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long double> vld;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion

// Effective std
#pragma region ESTD
template<typename C, typename T> int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F> int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T> void erase(C& c, T t) { remove(ALL(c), t), c.end(); }
template<typename C> void remove(vector<C>& c, unsigned int index) { c.erase(c.begin()+index); }
template<typename C, typename T, typename U> void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U> void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C> void reverse(C& c) { reverse(ALL(c)); }
template<typename C> void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred> void sort(C& c, Pred p) { sort(ALL(c), p); }
#pragma endregion

// ?????°
#pragma region CONST_VAL
constexpr int PI = (2*acos(0.0));
constexpr int EPS = (1e-9);
constexpr int MOD = (int)(1e9+7);
constexpr int INF = 100000000;
#pragma endregion

struct Point {
    double x;
    double y;
};

double Abs(double x) {
    return x >=0 ? x : -x;
};

double Square(const Point& P, const Point& Q, const Point& R) {
    Point A = {Q.x-P.x, Q.y-P.y};
    Point B = {R.x-P.x, R.y-P.y};
    return Abs(A.x*B.y-A.y*B.x);
};

bool solve(const Point& P, const Point& Q, const Point R, const Point O) {
    return (Square(P,Q,R) > Square(O,P,Q) + Square(Q, R, O));
}

int main()
{
    Point A, B, C, D;
    char c;
    while(cin>>A.x>>c>>A.y>>c>>B.x>>c>>B.y>>c>>C.x>>c>>C.y>>c>>D.x>>c>>D.y) {
        if(solve(A,B,C,D) || solve(B,C,D,A) || solve(C,D,A,B) || solve(D,A,B,C))
            P("NO");
        else
            P("YES");

    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <complex>
#include <cstdio>
#define EPS 1e-10
#define EQ(a,b) (abs(a - b) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()))
using namespace std;

typedef complex<double> P;

double angle (double c, double b, double a) {
    return (acos((b*b + c*c - a*a) / (2*b*c)) * 180.0 / M_PI);
}

int main ()
{
    double ax, ay, bx, by, cx, cy, dx, dy;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ax, &ay, &bx, &by, &cx, &cy, &dx, &dy) != EOF) {
        P a = P(ax, by);
        P b = P(bx, by);
        P c = P(cx, cy);
        P d = P(dx, dy);

        double angles = 0.0;
        angles += angle(abs(a - d), abs(a - b), abs(d - b));
        angles += angle(abs(b - a), abs(b - c), abs(a - c));
        angles += angle(abs(c - b), abs(c - d), abs(d - b));
        angles += angle(abs(d - a), abs(d - c), abs(a - c));

        if (EQ(angles, 360.0)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return 0;
}