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>
  
using namespace std;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
  
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
  
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

double dot(P a,P b){return real(conj(a)*b);}
double cross(P a,P b){return imag(conj(a)*b);}

int main(){
  double a,b,c,d,e,f,g,h;
  while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&b,&c,&d,&e,&f,&g,&h)){
    P x[6];
    x[0] = P(a,b);
    x[1] = P(c,d);
    x[2] = P(e,f);
    x[3] = P(g,h);
    x[4] = x[0];
    x[5] = x[1];
    double ccw = cross(x[2]-x[0],x[1]-x[0])
    bool flag = true;
    REPR(i,4){
      double ccc = cross(x[2+i]-x[i],x[1+i]-x[i]);
      if(ccw*ccc <= 0){
        flag = false;
        break;
      }
    }
    if(flag){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>

struct Vec {
    double x;
    double y;

    double operator*(Vec& vec)
    {
        return (x * vec.y - y * vec.x);
    }
};

int sgn(double x);

int main()
{
    double x1, y1, x2, y2, x3, y3, x4, y4;
    char ch;

    while (std::cin >> x1 >> ch >> y1 >> ch >> x2 >> ch >> y2 >> ch
                    >> x3 >> ch >> y3 >> ch >> x4 >> ch >> y4) {
        Vec vec12{x2 - x1, y2 - y1};
        Vec vec23{x3 - x2, y3 - y2};
        Vec vec34{x4 - x3, y4 - y3};
        Vec vec41{x1 - x4, y1 - y4};

        double cross01 = vec12 * vec23;
        double cross02 = vec23 * vec34;
        double cross03 = vec34 * vec41;
        double cross04 = vec41 * vec12;
        int judge = sgn(cross01) + sgn(cross02) + sgn(cross03) + sgn(cross04);

        if (judge == 1 + 1 + 1 + 1 || judge == -1 - 1 - 1 - 1) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }

    return 0;
}

int sgn(double x)
{
    return ((x >= 0)? 1: (-1));
}

C++: #include<iostream>
#include<cmath>
using namespace std;
//凹んでたら小さい方の角をとってしまう
//内角の和が360度か
double check(double x1, double y1, double x2, double y2, double x3, double y3) {
    double e1 = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
    double e2 = sqrt(pow(x3 - x2, 2) + pow(y3 - y2, 2));
    double e3 = sqrt(pow(x3 - x1, 2) + pow(y3 - y1, 2));
    double Cos = (e1 * e1 + e2 * e2 - e3 * e3) / (2 * e1 * e2);
    double PI = (double)acos(-1);
    return acos(Cos) * 180 / PI;
}
int main() {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    char c;
    while (cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd) {
        double r1, r2, r3, r4;
        r1 = check(xa, ya, xb, yb, xc, yc);
        r2 = check(xb, yb, xc, yc, xd, yd);
        r3 = check(xc, yc, xd, yd, xa, ya);
        r4 = check(xd, yd, xa, ya, xb, yb);
        //cout << r1 << " " << r2 << " " << r3 << " " << r4 << endl;
        double sum =  r1 + r2 + r3 + r4;
        //cout << sum << endl;
        if (sum >= 359 && sum <= 361) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <map>
#include <cstdio>
#include <utility>

using namespace std;
typedef pair<double,double> P;

int main(){
	double xa = 0,ya = 0,xb = 0,yb = 0,xc = 0,yc = 0,xd = 0,yd = 0;
	//cout << "OK" << endl;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) != EOF){
		double a = 0, b = 0, d = 0;
		//cout << xa << " " << ya << " " << xb << " " << yb << endl;
		P AD, AC, DB, DC, BA, BC;
		//cout << AD.first << " " << AD.second << endl;
		AD.first = xd - xa;
		AD.second = yd - ya;
		//cout << AD.first << " " << AD.second << endl;
		AC.first = xc - xa;
		AC.second = yc - ya;
		a = AD.second*AC.first - AD.first*AC.second;
		//cout << a << endl;

		DB.first = xb - xd;
		DB.second = yb - yd;
		DC.first = xc - xd;
		DC.second = yc - yd;
		d = DB.second*DC.first - DB.first*DC.second;

		BA.first = xa - xb;
		BA.second = ya - yb;
		BC.first = xc - xb;
		BC.second = yc - yb;
		b = BA.second*BC.first - BA.first*BC.second;
		//cout << a << b << d << endl;

		if(a >= 0 && b >= 0 && d >= 0) cout << "NO" << endl;
		else cout << "YES" << endl;

	}
	return 0;
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <numeric>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define PREP(it,array) for(vector<P>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)

#define MP       make_pair
#define PB       push_back
#define ALL(x)   (x).begin(),(x).end()

const int INF = 1<<29;
const double EPS = 1e-9;
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef long long LL;
typedef pair<int,int> P;



int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(7);

  float xa,ya,xb,yb,xc,yc,xd,yd;
  while( scanf( "%f,%f,%f,%f,%f,%f,%f,%f", &xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd ) != EOF ){
    if( signbit((xa-xc)*(yb-ya)+(ya-yc)*(xa-xb)) == 
        signbit((xa-xc)*(yd-ya)+(ya-yc)*(xa-xd)) ||
        signbit((xb-xd)*(ya-yb)+(yb-yd)*(xb-xa)) == 
        signbit((xb-xd)*(yc-yb)+(yb-yd)*(xb-xc)) )
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  
  

  return 0;
}