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 <bits/stdc++.h>

#define SIZE 300005
#define MOD 1000000007LL
#define INF INT_MAX / 3
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define FORALL(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef valarray<int> Array;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cout<<a[i];if(i==a.size()-1)cout<<endl;else cout<<" ";}}
int gcd(int a,int b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
int lcm(int a,int b){return a==0||b==0?0:a*b/gcd(a,b);}

double area(double x1, double y1, double x2, double y2, double x3, double y3)
{
  double a = x2 - x1;
  double b = y2 - y1;
  double c = x3 - x1;
  double d = y3 - y1;
  return fabs(0.5*(a*d-b*c));
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  double x1, y1, x2, y2, x3, y3, x4, y4;
  while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4))
  {
    double a1 = area(x1,y1,x2,y2,x3,y3);
    double a2 = area(x1,y1,x3,y3,x4,y4);
    double a3 = area(x1,y1,x2,y2,x4,y4);
    double a4 = area(x2,y2,x3,y3,x4,y4);
    printf("%s\n",fabs((a1+a2)-(a3+a4))<10e-8?"YES":"NO");
  }
  return 0;
}

C++: //
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>

using namespace std;


bool Solution(double ab, double ac, double ad, double bc, double bd, double cd)
{
    double sq1 = 0.0;
    double sq2 = 0.0;
    
    double S;
    double f;
    
    /*sq1*/
    f = (ab + ac + bc) * 0.5;   //judge formula
    S = sqrt(f * (f - ab) * (f - ac) * (f - bc));
    sq1 += S;
    
    f = (ac + ad + cd) * 0.5;
    S = sqrt(f * (f - ac) * (f - ad) * (f - cd));
    sq1 += S;
    
    /*sq2*/
    f = (ab + ad + bd) * 0.5;
    S = sqrt(f * (f - ab) * (f - ad) * (f - bd));
    sq2 += S;
    
    f = (bc + bd + cd) * 0.5;
    S = sqrt(f * (f - bc) * (f - bd) * (f - cd));
    sq2 += S;
    
    if (fabs(sq1 - sq2) <= 0.01)
    {
        return true;
    }
    else
    {
        return false;
    }

}

int main()
{
    double xa, ya;
    double xb, yb;
    double xc, yc;
    double xd, yd;
    
    double ab;   //module
    double ac;
    double ad;
    double bc;
    double bd;
    double cd;
    
    while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd)
    {
        
        ab = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
        ac = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));
        ad = sqrt((xa - xd) * (xa - xd) + (ya - yd) * (ya - yd));
        bc = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc));
        bd = sqrt((xb - xd) * (xb - xd) + (yb - yd) * (yb - yd));
        cd = sqrt((xc - xd) * (xc - xd) + (yc - yd) * (yc - yd));
        
        if (Solution(ab, ac, ad, bc, bd, cd))
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<complex>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

// vector(geometric) definition
typedef complex<double> cdouble;
// define with polor
const int N = 4;

int main()
{
    cdouble v[N + 2];
    double x[N], y[N];
    char t;
    while(cin>>x[0]>>t>>y[0]>>t >>x[1]>>t>>y[1]>>t >>x[2]>>t>>y[2]>>t
            >>x[3]>>t>>y[3])
    {
        REP(N) v[i] = cdouble(x[i], y[i]);
        v[N] = v[0];
        v[N + 1] = v[1];
        double ang[N + 2];
        //REP(6)cout << v[i] << endl;

        for(int i = 1; i <= 4; i++)
        {
            ang[i] = fmod( arg(v[i - 1] - v[i]) - arg(v[i + 1] - v[i]) + 10 * M_PI, M_PI * 2); 
            //cout << i << "th angle = " << ang[i] << endl;
        }
        int ans = 1;
        if(ang[1] > M_PI) {REP(4)if(ang[i + 1] < M_PI) ans = 0; }
        else {REP(4)if(ang[i + 1] > M_PI) ans = 0;}
        if(ans) cout << "yes" << endl;
        else cout << "no" << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<cstdlib>
#include<cmath>
#include<vector>

#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
#define EPS (1e-10)
#define equals(a,b) (fabs((a)-(b)) < EPS)

using namespace std;

class Point{
public:
  double x,y;
  
  Point(double x = 0, double y = 0): x(x),y(y){};
  
  Point operator + (Point p) {return Point(x+p.x,y+p.y);}
  Point operator - (Point p) {return Point(x-p.x,y-p.y);}
  Point operator * (double a) {return Point(a*x,a*y);}

  double own_dot(){return x*x+y*y;};
  double abs(){return sqrt(own_dot());}

  bool operator < (const Point &p) const {
    return x != p.x ? x < p.x : y < p.y;
  }
  bool operator == (const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

// 内積 
double dot(Point a, Point b){
  return a.x*b.x+a.y*b.y;
}

// 外積
double cross(Point a, Point b){
  return a.x*b.y-a.y*b.x; 
}

//ベクトルp0p1に対する点p2の位置を求める
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;

int ccw(Point p0, Point p1, Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS) return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS) return CLOCKWISE;
  if(dot(a,b) < -EPS) return ONLINE_BACK;
  if(a.own_dot() < b.own_dot()) return ONLINE_FRONT;
  return ON_SEGMENT;
}

Point in[4];

bool isconvex(Point p[4]) {
  int c = ccw(p[0],p[1],p[2]);
  for (int i = 0; i < 4; i++)
    if (c != ccw(p[i], p[(i+1)%4], p[(i+2)%4] )) return false;
  return true;
}

int main(){
  while(1){
    char c;

    for(int i = 0; i < 4; i++)
      if(i == 3) cin >> in[i].x >> c >> in[i].y;
      else if(!(cin >> in[i].x >> c >> in[i].y >> c)) return 0;

    if(isconvex(in)) cout << "YES" << endl;
    else cout << "NO" << endl;

  }
  return 0;
}