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 <string>
#include <vector>
#include <stdlib.h>
using namespace std;
struct Point
{
	Point(double _x, double _y) : x(_x), y(_y) {}
	double x;
	double y;
};
typedef Point Vector;
bool isConvex(Point& P1, Point& P2, Point& P3){
	Vector V1(P1.x - P2.x, P1.y - P2.y);
	Vector V2(P3.x - P2.x, P3.y - P2.y);
	return (V1.x * V2.y - V1.y * V2.x) > 0;
}
bool isConvexSquare(Point& P1, Point& P2, Point& P3, Point& P4){
	bool b1 = isConvex(P1, P2, P3);
	bool b2 = isConvex(P2, P3, P4);
	bool b3 = isConvex(P3, P4, P1);
	bool b4 = isConvex(P4, P1, P2);
	return (b1 == b2 && b2 == b3 && b3 == b4 && b4 == b1);
}
vector<double> Split(string& line){
	vector<double> vN(8, 0.0);
	string::size_type p1 = 0;
	string::size_type p2 = line.find(',');
	int i = 0;
	double v;
	while (p1 != string::npos){
		if (p1 == 0) v = atof(line.substr(0, p2).c_str());
		else if (p2 != string::npos)	v= atof(line.substr(p1 + 1, p2 - p1 - 1).c_str());
		else v = atof(line.substr(p1 + 1).c_str());
		vN[i] = v;
		p1 = p2;
		++i;
		if (p1 != string::npos)
			p2 = line.find(',', p1 + 1);
	}
	return vN;
}
void getValue(string& line, double* X, double* Y){
	vector<double> vN = Split(line);
	X[0] = vN[0];
	Y[0] = vN[1];
	X[1] = vN[2];
	Y[1] = vN[3];
	X[2] = vN[4];
	Y[2] = vN[5];
	X[3] = vN[6];
	Y[4] = vN[7];
}
int main()
{
	double X[4] = {}, Y[4] = {};
	string line;
	while (cin >> line){
		getValue(line, X, Y);
		Point P1(X[0], Y[0]);
		Point P2(X[1], Y[1]);
		Point P3(X[2], Y[2]);
		Point P4(X[3], Y[3]);
		if (isConvexSquare(P1, P2, P3, P4)) cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
double check(double x1,double y1,double x2,double y2,double x3,double y3);
int main(void){
    double xa,xb,xc,xd,ya,yb,yc,yd;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
        double sq1S=check(xa,ya,xb,yb,xc,yc)+check(xa,ya,xd,yd,xc,yc);
        double sq2S=check(xb,yb,xc,yc,xd,yd)+check(xb,yb,xa,ya,xd,yd);

        double var=sq1S-sq2S;
        if(fabs(var)<=0.01)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;

	}
	return 0;
}

double check(double x1,double y1,double x2,double y2,double x3,double y3){
    double ab,bc,ca;
    double S,s;
    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;
}

C++: // 0012 を使い回す
#include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;

bool same_side(double x1, double y1, double x2, double y2, double x, double y, double x0, double y0) {
  return ((y1 - y2) * (x - x2) - (x1 - x2) * (y - y2)) * ((y1 - y2) * (x0 - x2) - (x1 - x2) * (y0 - y2)) >= 0;
}


bool in_triangle(double x1, double y1, double x2, double y2, double x3, double y3, double xp, double yp) {
  return same_side(x1,y1,x2,y2,xp,yp,x3,y3) && same_side(x2,y2,x3,y3,xp,yp,x1,y1) && same_side(x3,y3,x1,y1,xp,yp,x2,y2);
}


int main() {
  double x[4];
  double y[4];
  char c,d;
  while (cin >> x[0] >> c >> y[0]) {
    for (int i = 1; i < 4; i++)
      cin >> c >> x[i] >> d >> y[i];

    bool res = true;
    int k[4];
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 4; j++)
        k[j] = (j + i) % 4;
      if (in_triangle(x[k[0]], y[k[0]], x[k[1]], y[k[1]], x[k[2]], y[k[2]], x[k[3]], y[k[3]]))
        res = false;
    }

    if (res) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}

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

int main()
{
	std::array<double, 4> x;
	std::array<double, 4> y;
	char comma;
	while (std::cin >> x[0] >> comma >> y[0]) {
		for (std::size_t i = 1; i < 4; ++i) {
			std::cin >> comma >> x[i] >> comma >> y[i];
		}
		if ((((y[1] - y[0]) * (x[0] - x[2]) - (y[0] - y[2]) * (x[1] - x[0])) *
			 ((y[3] - y[0]) * (x[0] - x[2]) - (y[0] - y[2]) * (x[3] - x[0])) < 0) and
			(((y[0] - y[1]) * (x[1] - x[3]) - (y[1] - y[3]) * (x[0] - x[1])) *
			 ((y[2] - y[1]) * (x[1] - x[3]) - (y[1] - y[3]) * (x[2] - x[1])) < 0)) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
	return 0;
}

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

#define EPS 1e-7

typedef complex<double> P;
#define X real()
#define Y imag()

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

int isIntersected(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;
}

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 aa(a,b), bb(c,d), cc(e,f), dd(g,h);
                cout<<( isIntersected(aa,cc,bb,dd)>0.0 || isIntersected(bb,dd,aa,cc)>0.0 ? "YES" : "NO" )<<endl;
        }

        return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#include "../..//library/unfinished/convex_hull.cpp"

#define fs first
#define sc second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ") 
{ rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

int main() {
	double a, b;
	char c;
	vector<Point> vi;
	while (cin >> a >> c >> b) {
		vi.clear();
		vi.pb(Point(a, b));
		rep(i, 3) {
			cin >> c >> a >> c >> b;
			vi.pb(Point(a, b));
		}

		vector<Point> po = convex_hull(vi, vi.size());
		cout << (po.size() == vi.size() ? "YES" : "NO") << endl;
	}
}