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 <fstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <list>
#include <utility>
#include <cmath>
#include <sstream>
#define F first
#define S second
#define FOR(i,n) for(int i=0;i<(int)n;i++)
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define FORI(i,k,n) for(int i=k;i<(int)n;i++)
#define repp(i,k,n) for(int i=k;i<(int)n;i++)
using namespace std;
typedef pair<double, double> pdd;
const double EPS = 10e-6;
double wid(pdd a, pdd b) {
	return sqrt((a.first - b.first) * (a.first - b.first) + (a.second - b.second) * (a.second - b.second));
}
double yoge(pdd a, pdd b, pdd c) {
	double A, B, C;
	C = wid(a, b); A = wid(b, c); B = wid(c, a);
	return abs(acos((B*B+C*C-A*A)/(2*B*C)));
}
int main() {
	pdd p[4];
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p[0].first,&p[0].second,&p[1].first,&p[1].second,&p[2].first,&p[2].second,&p[3].first,&p[3].second)!=EOF) {
		bool ok = true;
		if(yoge(p[0],p[3],p[1])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[1],p[0],p[2])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[2],p[1],p[3])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[3],p[2],p[0])/3.1415926535*180-90>EPS)ok=false;

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

}

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

typedef complex<double> P;

// ?¨±?????????????????
#define EPS (1e-10)
// 2??????????????????????????????????????????
#define EQ(a,b) (abs((a)-(b)) < EPS)
// 2??????????????????????????????????????????
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )

// ?????? (cross product) : a??b = |a||b|sin??
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
// ????§???¢(v1,v2,v3)????????????v?????????????????????
bool inTriangle(P v1,P v2,P v3,P v){
	if(cross(v2-v1,v-v1)<-EPS&&cross(v3-v2,v-v2)<-EPS&&cross(v1-v3,v-v3)<-EPS)return true;
	else if(cross(v2-v1,v-v1)>EPS&&cross(v3-v2,v-v2)>EPS&&cross(v1-v3,v-v3)>EPS)return true;
	return false;
}

P data[4];
bool input(){
	char c;
	
	for(int i=0;i<4;i++){
		if(!(cin>>data[i].real()))return false;
		cin>>c;
		cin>>data[i].imag();
		if(i<3)cin>>c;
	}
	return true;
}
int n[4]={0,1,2,3};
int main(){
	while(input()){
		do{
			if(inTriangle(data[n[0]],data[n[1]],data[n[2]],data[n[3]])){
				cout<<"NO"<<endl;
				return 0;
			}
		}while(next_permutation(n,n+4));
		cout<<"YES"<<endl;
	}
	
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>

using namespace std;

typedef complex<double> Point;

//Verified PKU 2812
double cross(const Point &v1, const Point &v2) {
    return (v1.real()*v2.imag()) - (v1.imag()*v2.real());
}

//Verified AOJ 0012
bool ccw(const Point &p1, const Point &p2, const Point &p3) {
    return cross(p2-p1, p3-p1) < 0;
}

int main() {
    string line;
    while(cin >> line) {
        for(int i = 0; i < line.size(); ++i)
            if(line[i] == ',') line[i] = ' ';
        istringstream is(line);
        Point ps[4];
        for(int i = 0; i < 4; ++i) is >> ps[i].real() >> ps[i].imag();
        bool prev = ccw(ps[0], ps[1], ps[2]);
        bool ok = true;
        for(int i = 1; i < 4; ++i) {
            if(ccw(ps[i], ps[(i+1)%4], ps[(i+2)%4]) != prev) {
                ok = false;
                break;
            }
        }
        cout << (ok?"YES":"NO") << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#define PI 3.1415926535898
#define EPS 1e-9
using namespace std;

double calc(double a1,double a2,double b1,double b2){
	return acos((a1 * b1 + a2 * b2) / sqrt(a1 * a1 + a2 * a2) / sqrt(b1 * b1 + b2 * b2)) * 180.0 / PI;
}

int main(){
	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) != EOF){
		double c1,c2,c3,c4;
		c2 = calc(x1 - x2,y1 - y2,x3 - x2,y3 - y2);
		c3 = calc(x2 - x3,y2 - y3,x4 - x3,y4 - y3);
		c4 = calc(x3 - x4,y3 - y4,x1 - x4,y1 - y4);
		c1 = calc(x4 - x1,y4 - y1,x2 - x1,y2 - y1);
		if(abs(360.0 - (c1 + c2 + c3 + c4)) <= EPS) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
typedef complex<double> P;
typedef vector<P> G;
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;
}

G convex_hull(G &ps) {
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  G 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]) == -1) --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]) == -1) --k;
  ch.resize(k-1);
  return ch;
}

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){
    G ps;
    ps.push_back(P(xa, ya));
    ps.push_back(P(xb, yb));
    ps.push_back(P(xc, yc));
    ps.push_back(P(xd, yd));
    G tmp = convex_hull(ps);
    cout <<(4 == (int)(tmp.size()) ? "YES" : "NO") <<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

bool check(double x1, double y1, double x2, double y2, double x3, double y3);

int main(void){
  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){
    if(check(xa,ya,xb,yb,xc,yc) && check(xb,yb,xc,yc,xd,yd) && check(xc,yc,xd,yd,xa,ya) && check(xd,yd,xa,ya,xb,yb)){
      cout<<"YES"<<endl;
    }
    else if(!check(xa,ya,xb,yb,xc,yc) && !check(xb,yb,xc,yc,xd,yd) && !check(xc,yc,xd,yd,xa,ya) && !check(xd,yd,xa,ya,xb,yb)){
      cout<<"YES"<<endl;
    }
    else{
      cout<<"NO"<<endl;
    }
  }
}

bool check(double x1, double y1, double x2, double y2, double x3, double y3){
  double z;
  z=(x1-x2)*(y3-y2)-(x3-x2)*(y1-y2);
  if(z>0){
    return true;
  }
  else{
    return false;
  }
}