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<iomanip>
#include<sstream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef map<string,int> dict;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}


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 P{
  double x,y;
  P(){}
  P(double _x,double _y):x(_x),y(_y){}
  P operator + (P p){
    return P(add(x,p.x) ,add(y,p.y));
  }
  P operator - (P p){
    return P(add(x,-p.x) ,add(y,-p.y));
  }
  P operator * (double d){
    return P(x * d,y * d);
  }
  double dot(P p){
    return add(x * p.x,y*p.y);
  }
  double det(P p){
    return add(x*p.y,-y*p.x);
  }
};
//???????????????????????¨?????????
bool on_seg(P p1,P p2,P q){
  return (p1-q).det(p2-q) == 0 && (p1-q).dot(p2-q) <= 0;
}
//???????°????
P intersection(P p1, P p2, P q1,P q2){
  return p1 + (p2-p1) * ((q2 - q1).det(q1-p1) / (q2 - q1).det(p2-p1)) ;
}

bool cmp_x(const P& p, const P& q){
  if(p.x != q.x) return p.x < q.x;
  return p.y < q.y;
}
void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}
vector<P> convex_hull(P *ps,int n){
  sort(ps,ps+n,cmp_x);
  int k = 0;
  vector<P> qs(n*2);
  rep(i,n){
    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);
//   cout << n-qs.size() << endl;
  Ans(n-qs.size() == 0);
  return qs;
}

double dist(P p,P q){
  return (p - q).dot(p - q);
}

constexpr int MAX_N = 5;
P ps[MAX_N];
void Solve(){
  vector<P> qs = convex_hull(ps,4);
}
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  char c;
  while(cin >> ps[0].x >>c >> ps[0].y >> c >> ps[1].x >> c >> ps[1].y >>c >> ps[2].x >> c >> ps[2].y >> c >>ps[3].x>>c>>ps[3].y){
    Solve();
    }
  return 0;
}

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

using namespace std;

const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;

namespace std {
    bool operator < (const P& a, const P& b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
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;       // counter clockwise
    if (cross(b, c) < 0)   return -1;       // clockwise
    if (dot(b, c) < 0)     return +2;       // c--a--b on line
    if (norm(b) < norm(c)) return -2;       // a--b--c on line
    return 0;
}

vector<P> convex_hull(vector<P> ps) {
    int n = ps.size(), k = 0;
    sort(ps.begin(), ps.end());
    vector<P> ch(2*n);
    for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull
        while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
    for (int i = n-2, t = k+1; i >= 0; ch[k++] = ps[i--]) // upper-hull
        while (k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
    ch.resize(k-1);
    return ch;
}

int main(){
    vector<P> v(4);
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &v[0].real(), &v[0].imag(), &v[1].real(), &v[1].imag(), &v[2].real(), &v[2].imag(), &v[3].real(), &v[3].imag()) != EOF){
        vector<P> q =  convex_hull(v);
        cout << (q.size()==4?"YES":"NO") << endl;
    }
}

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

using namespace std;

class PointF
{
public:
	double x,y;
PointF(){}
	PointF(int X,int Y)
	{
		x=X;y=Y;
	}
	double fun(PointF p)
	{
		return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
	}
};

PointF point[4];

double ab,ac,ad,bc,bd,cd;

void set()//準備
{
	ab=point[0].fun(point[1]);
	ac=point[0].fun(point[2]);
	ad=point[0].fun(point[3]);
	bc=point[1].fun(point[2]);
	bd=point[1].fun(point[3]);
	cd=point[2].fun(point[3]);
}

double check(double a,double b,double c)
{
	double S=(a+b+c)/2;
	return sqrt(S-a+S-b+S-c);
}

int main()
{
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&point[0].x,&point[0].y,&point[1].x,&point[1].y,&point[2].x,&point[2].y,&point[3].x,&point[3].y)!=EOF)
	{
		set();
		if(check(ab,bc,ac)+check(ac,ad,cd)>check(ab,bd,ad)+check(bc,cd,bd)-0.0000000001&&check(ab,bc,ac)+check(ac,ad,cd)<check(ab,bd,ad)+check(bc,cd,bd)+0.0000000001)
		{
			printf("YES\n");
		}
		else printf("NO\n");
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;
double x[4], y[4];
double ab, bc, cd, da, ac, bd;

double len(double x1, double y1, double x2, double y2)
{
    return sqrt(pow(x1-x2, 2.0) + pow(y1-y2, 2.0));
}

// Heron's Formula
double square(double a, double b, double c)
{
    double s = (a + b + c) / 2.0;
    return sqrt(s * (s-a) * (s-b) * (s-c));
}


int main(void)
{
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)) {
        ab = len(x[0],y[0],x[1],y[1]);
        bc = len(x[1],y[1],x[2],y[2]);
        cd = len(x[2],y[2],x[3],y[3]);
        da = len(x[3],y[3],x[1],y[1]);
        ac = len(x[0],y[0],x[2],y[2]);
        bd = len(x[4],y[4],x[1],y[1]);
        double s1,s2,s3,s4;
        s1 = square(ab, bd, da);
        s2 = square(cd, bd, bc);
        s3 = square(ac, cd, da);
        s4 = square(ab, bc, ac);
        double comp1;
        comp1 = (s1+s2) - (s3+s4);

        if(fabs(comp1) <= 0.001)
            puts("YES");
        else
            puts("NO");
    }
    return 0;
}