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 <map>
#include <vector>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define MC make_pair
#define ML make_pair 
#define X real()
#define Y imag()
typedef double D;
typedef bool B;
typedef complex<D> P;   //点
typedef complex<D> V;   //ベクトル
typedef pair<P,P>  L;   //直線
typedef pair<P,D>  C;   //円
typedef vector<P>  Pol; //多角形

//変数名定義
const D INF = 1e100;
const D EPS = 1e-8;
const D PI = acos(-1);

template<class T> bool operator==(T a, T b){return abs(a - b )< EPS;}
template<class T> int sig(T r) {return (r==0||r==-0) ? 0 : r > 0 ? 1 : -1;}

P points[4];

// ベクトルaの絶対値を求める
// D Length = abs(a);

// 2点a,b間の距離を求める
// D Distance = abs(a-b); 

// 内積 (Inner Product) : a・b = |a||b|cosθ 1
D IP(V a, V b) {
	return (a.real() * b.real() + a.imag() * b.imag());
}

// 外積 (Exterior Product) : |a×b| = |a||b|sinθ 2
D EP(V a, V b) {
	return (a.real() * b.imag() - a.imag() * b.real());
}

// 点の進行方向について 3
int ccw(P a, P b, P c) {              //点aと点bが与えられた問いに
  b -= a; c -= a;
  if (EP(b, c) > 0)   return +1;      // counter clockwise
  if (EP(b, c) < 0)   return -1;      // clockwise
  if (IP(b, c) < 0)     return +2;    // c--a--b on line
  if (norm(b) < norm(c)) return -2;   // a--b--c on line
  return 0;                           // a--c--b on line  aとbの線分判定はこれ
}

int main(void){
	char tmp;
	while(true){
		cin >> points[0].X >> tmp >> points[0].Y;
		if(cin.eof())
			break;
		rep(i,3)
			cin >> tmp >> points[i+1].X >>tmp >> points[i+1].Y ;
		int dir;
		bool flag=true;
		dir=ccw(points[0],points[1],points[2]);
		rep(i,4){
			int cur=ccw(points[i%4],points[(i+1)%4],points[(i+2)%4]);
			if(cur != dir)
				flag=false;
		}
		if(flag)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include "math.h"
#include "stdio.h"
#include <algorithm>
#include <string>
#include <map>
#include <iostream>

using namespace std;

/** Problem0035 : It is Convex? **/
double calcS(double x1, double y1, double x2, double y2, double x3, double y3)
{
	double S, s, ab, bc, ca;
	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;
}

int main()
{
	double x1, y1, x2, y2, x3, y3, x4, y4;
	char c;
	
	while (1) {
		cin >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> x3 >> c >> y3 >> c >> x4 >> c >> y4;
		if (cin.eof()) break;
		
		if (calcS(x1,y1,x2,y2,x3,y3)+calcS(x1,y1,x4,y4,x3,y3)==calcS(x2,y2,x3,y3,x4,y4)+calcS(x2,y2,x1,y1,x4,y4))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

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

typedef complex<double> P;

#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()) )

double cross(P ,P);
int func(P,P,P,P);

int main(void){
  double xa,ya,xb,yb,xc,yc,xd,yd;
  P a,b,c,d;

  while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf"
	      ,&a.real(),&a.imag(),&b.real(),&b.imag()
	      ,&c.real(),&c.imag(),&d.real(),&d.imag())){
    if(func(a,b,c,d)||func(a,c,b,d))cout << "YES" << endl;
    else cout << "NO" << endl;
  }


  return 0;
}

double cross(P a,P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}

int func(P a1,P a2,P b1,P b2) {
  return ( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) &&
         ( cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1) < EPS );
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

double isConvex(double xa, double ya, double xb, double yb, double x, double y)
{
	double ret;
	ret = (xa-xb)*(y-ya) + (ya-yb)*(xa-x);
	return ret;
}

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 ){
		// 直線BDと線分ACが交わるか
		double bd_ac = isConvex(xb, yb, xd, yd, xa, ya)*isConvex(xb, yb, xd, yd, xc, yc);
		// 直線ACと線分BDが交わるか
		double ac_bd = isConvex(xa, ya, xc, yc, xb, yb)*isConvex(xa, ya, xc, yc, xd, yd);
		
		// bd_acが負またはac_bdが負ならば、交差している
		if( bd_ac < 0.0 || ac_bd < 0.0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
		
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <complex>

using namespace std;

double cross(complex<double> A, complex<double> B)
{
  return A.real() * B.imag() - A.imag() * B.real();
}

int main()
{
  complex<double> p[4];
  double x, y;
  while (scanf("%lf,%lf", &x, &y) == 2) {
    p[0] = complex<double>(x, y);
    for (int i = 1; i < 4; i++) {
      scanf(",%lf,%lf", &x, &y);
      p[i] = complex<double>(x, y);
    }
    
    if (cross(p[2] - p[0], p[1] - p[2]) * cross(p[2] - p[0], p[3] - p[2]) < 0 &&
	cross(p[3] - p[1], p[0] - p[3]) * cross(p[3] - p[1], p[2] - p[3]) < 0) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <complex>
using namespace std;
typedef complex<double> C;
#define EPS (1e-8)
double cross(C a, C b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
const string mes[2] = {"YES", "NO"};
double xa, ya, xb, yb, xc, yc, xd, yd;

void solve() {
  C a(xa, ya), b(xb, yb), c(xc, yc), d(xd, yd);
  // ABC
  // BCD
  // CDA
  // DAB
  double scross = 
    cross(a-b,b-c) * cross(b-c,c-d) * cross(c-d,d-a) * cross(d-a,a-b);
  int res = (scross > EPS) ? 0 : 1 ;
  cout<<mes[res]<<endl;
}

int main (int argc, char const* argv[]) {
  char c;
  while (cin>>xa>>c>>ya>>c>>xb>>c>>yb>>c>>xc>>c>>yc>>c>>xd>>c>>yd) {
    solve();
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <complex>

bool read_data(std::complex<double>* points)
{
	double coords[8];
	for (int i = 0; i < 8; ++i) {
		if (scanf((i==0) ? "%lf" : ",%lf", &coords[i]) != 1) {
			return false;
		}
	}
	for (int i = 0; i < 4; ++i) {
		points[i] = std::complex<double>(coords[i*2], coords[i*2+1]);
	}
	return true;
}


int main()
{
	std::complex<double> points[4];
	while (read_data(points)) {
		int imag[4] = {};
		for (int i = 0; i < 4; ++i) {
			imag[i] = ((points[(i+2)%4]-points[(i+1)%4])/(points[i%4]-points[(i+1)%4])).imag();
		}
		if ((imag[0] > 0 && imag[1] > 0 && imag[2] > 0 && imag[3] > 0) || 
			(imag[0] < 0 && imag[1] < 0 && imag[2] < 0 && imag[3] < 0))
		{
			std::cout << "YES\n";
		} else {
			std::cout << "NO\n";
		}
	}

	return 0;
}

C++: #include <stdio.h>

int main(void) {
  double x[4], y[4];
  int i, j;
  while(scanf("%lf,%lf", &x[0], &y[0]) != EOF) {
    for(i = 1; i < 4; ++i) scanf(",%lf,%lf", &x[i], &y[i]);
    int s, ans = 1;
    if((x[1] - x[0]) * (y[2] - y[0]) - (y[1] - y[0]) * (x[2] - x[0]) > 0) s = 1;
    else s = 0;
    for(i = 1; i < 4; ++i) {
      double tmp = (x[(i + 1) % 4] - x[i]) * (y[(i + 2) % 4] - y[i]) - (y[(i + 1) % 4] - y[i]) * (x[(i + 2) % 4] - x[i]);
      if((s && tmp < 0) || (!s && tmp > 0)) {
        ans = 0;
        break;
      }
    }
    if(ans) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}