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 <sstream>
#include <string>
#include <utility>

using namespace std;
using P = pair<double,double>;
constexpr int n = 10;

double cross(const P &p1,const P &p2){
  return p1.first*p2.second - p2.first*p1.second;
}

int main(){
  string str;
  while(getline(cin,str)){
    double tmp[8];
    P p[4];
    string tmpstr;
    istringstream stream(str);
    for(int i=0;getline(stream,tmpstr,',')&&i<8;++i){
      tmp[i] = stof(tmpstr);
    }
    for(int i=0;i<4;++i){
      p[i].first = tmp[(i+1)%4*2]-tmp[i*2];
      p[i].second = tmp[(i+1)%4*2+1]-tmp[i*2+1];
      // cout << p[i].first << "," << p[i].second << endl;
    }
    
    bool allpos = true ,allneg = true;
    for(int i=0;i<4;++i){
      double val = cross(p[i],p[(i+1)%4]);
      // cout << val << endl;
      allpos = allpos && val>0;
      allneg = allneg && val<0;
    }

    bool isconvex = allneg||allpos;
    if(isconvex){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int const MOD = 1000000007;

// 2???????????????????????????????±???????
double dot(P a, P b) {
    return (a.X * b.X + a.Y * b.Y);
}

// 2???????????????????????????????±???????
double cross(P a, P b) {
    return (a.X * b.Y - a.Y * b.X);
}

int ccw(P a, P b, P c) {
    b -= a; c -= a;
    if( cross(b,c) > EPS ) return +1;
    if( cross(b,c) < -EPS ) return -1;
    if( dot(b,c) < 0 ) return +2;
    if( norm(b) < norm(c) ) return -2;
    return 0;
}

bool isCcwConvex(const vector<P> &ps) {
    int n = ps.size();
    rep(i,0,n) if(ccw(ps[i], ps[(i+1) % n], ps[(i+2) % n]) == -1) return false;
    return true;
}

int main() {
    P a, b, c, d;
    vector<P> ps;
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.X, &a.Y, &b.X, &b.Y, &c.X, &c.Y, &d.X, &d.Y)) {
        ps.pb(a); ps.pb(b); ps.pb(c); ps.pb(d);
        if(isCcwConvex(ps)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

bool check(int x1, int y1, int x2, int y2){
  return x1 * y2 - y1 * x2 >= 0;
}

int main(void) {

  vector<double> xd(4);
  vector<double> yd(4);
  vector<int> x(4);
  vector<int> y(4);
  while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xd[0], &yd[0], &xd[1], &yd[1], &xd[2], &yd[2], &xd[3], &yd[3]) != EOF ){
    for(int i=0; i<4; i++){
      x[i] = 100 * xd[i];
      y[i] = 100 * yd[i];
    }
    bool f = true;
    for(int i=0; i<4; i++){
      int j = i + 1;
      if( check(x[i%4]-x[(i+1)%4], y[i%4]-y[(i+1)%4], x[(i+1)%4]-x[(i+2%4)], y[(i+1)%4]-y[(i+2%4)]) != check(x[j%4]-x[(j+1)%4], y[j%4]-y[(j+1)%4], x[(j+1)%4]-x[(j+2%4)], y[(j+1)%4]-y[(j+2%4)]) ){
        f = false;
        break;
      }
    }
    cout << ( f ? "YES":"NO") << endl;
  }

  return 0;
}

// EOF

C++: #include <iostream>
#include <stdio.h>
using namespace std;

class Vec
{
public:
	double x, y;
	Vec(double x, double y) : x(x), y(y){}
	Vec(){}

	Vec operator-(Vec v)
	{
		return Vec(x - v.x, y - v.y);
	}
	double GetCp(Vec v)
	{
		return (x * v.y - y * v.x);
	}
};

bool IsHit(Vec a, Vec b, Vec c, Vec p)
{
	double A = (b - a).GetCp(p - a);
	double B = (c - b).GetCp(p - b);
	double C = (a - c).GetCp(p - c);

	return (A >= 0 && B >= 0 && C >= 0) || (A <= 0 && B <= 0 && C <= 0);
}


int main()
{
	Vec v[4];
	while (true)
	{
		for (int i = 0; i < 4; i++)
		{
			if (scanf("%lf,", &(v[i].x)) == -1) return 0;
			if (scanf("%lf,", &(v[i].y)) == -1) return 0;
		}

		if (IsHit(v[0], v[1], v[2], v[3]) ||
			IsHit(v[3], v[0], v[1], v[2]) ||
			IsHit(v[2], v[3], v[0], v[1]) ||
			IsHit(v[1], v[2], v[3], v[0]))
		{
			cout << "NO" << endl;
		}
		else
		{
			cout << "YES" << endl;
		}
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <complex>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define P complex<double>

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

vector<P> g(4);
double cross(P a,P b){
  return a.real() * b.imag() - a.imag() * b.real();
}
int main(void){
  double x[4],y[4];
  char d;
  while(cin>> g[0].real() >> d >> g[0].imag(),!cin.eof()){
    loop(i,1,4){
      cin>>d>>g[i].real() >> d >> g[i].imag();
    }
    string res = "NO";
    rep(k,2){
      rep(i,4){
    P a = g[(i+1)%4] - g[i];
    P b = g[(i+2)%4] - g[i];
    if(cross(a, b) < 0.0) break;
    if(i+1 == 4) res = "YES";
      }
      reverse(g.begin(), g.end());
    }
    cout<<res<<endl;
  }
}

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

constexpr double EPS = 1e-9;

double cross(double x1, double y1, double x2, double y2) {
	return x1 * y2 - y1 * x2;
}

int ccw(double x1, double y1, double x2, double y2, double x3, double y3) {
	x2 -= x1;
	y2 -= y1;
	x3 -= x1;
	y3 -= y1;

	const double t = cross(x2, y2, x3, y3);
	if(t > EPS) return 1;
	if(t < -EPS) return -1;
	return 0;
}

int main() {
	double x[4];
	double 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) == 8) {
		bool ok = true;
		const int t = ccw(x[0], y[0], x[2], y[2], x[1], y[1]);
		for(int i = 1; i < 4; ++i) {
			const int next = (i + 1) % 4;
			const int next2 = (i + 2) % 4;
			if(t != ccw(x[i], y[i], x[next2], y[next2], x[next], y[next])) {
				ok =false;
				break;
			}
		}

		puts((ok ? "YES" : "NO"));
	}


	return 0;
}