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 <cstdio>
#include <string>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

namespace std {
    bool operator<(const P a, const P b) {
        return a.X != b.X ? a.X < b.X : a.Y < b.Y;
    }
}

int const MOD = 1000000007;

// 2???????????????????????????????±???????
double dot(P a, P b) {
    return (a.X * b.X + a.Y * b.Y);
}

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

int ccw(P a, P b, P c) {
    b -= a; c -= a;
    if( cross(b,c) > EPS ) return +1;
    if( cross(b,c) < -EPS ) return -1;
    if( dot(b,c) < 0 ) return +2;
    if( norm(b) < norm(c) ) return -2;
    return 0;
}

bool isCcwConvex(const vector<P> &ps) {
    int n = ps.size();
    rep(i,0,n) if(ccw(ps[i], ps[(i+1) % n], ps[(i+2) % n]) == -1) return false;
    return true;
}

bool isCcwConvex2(const vector<P> &ps) {
    int n = ps.size();
    rep(i,0,n) if(ccw(ps[i], ps[(i+1) % n], ps[(i+2) % n]) == 1) return false;
    return true;
}

int main() {
    P a, b, c, d;
    vector<P> ps;
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.X, &a.Y, &b.X, &b.Y, &c.X, &c.Y, &d.X, &d.Y)) {
        ps.pb(a); ps.pb(b); ps.pb(c); ps.pb(d);
        if(isCcwConvex(ps) || isCcwConvex2(ps)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.ic", "r", stdin);
	string str = "";

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		vector <double> x (4, 0. );
		vector <double> y (4, 0. );
		vector <double> vx (4, 0. );
		vector <double> vy (4, 0. );

		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss(str);
		int i;

		for (i = 0; i < 4; ++i){
			ss >> x[i] >> y[i];
		} // end for
		
		for (i = 0; i < 4; ++i){
			vx[i] = x[(i+1) % 4] - x[i];
			vy[i] = y[(i+1) % 4] - y[i];
//			cout << "v[" << i << "]: " << '(' << vx[i] << ',';
//			cout << vy[i] << ')' << endl;
		} // end for
		vector <double> inp (4, 0.);
		for (i = 0; i < 4; ++i){
//			double v2x = x[(i+2) % 4] - x[i];
//			double v2y = y[(i+2) % 4] - y[i];
			double v2x = vx[(i+1) % 4] + vx[i];
			double v2y = vy[(i+1) % 4] + vy[i];
			double v1x = vx[i];
			double v1y = vy[i];
//			cout << "v2" << '(' << v2x << ',' << v2y << ')' << endl;
//			cout << "v1" << '(' << v1x << ',' << v1y << ')' << endl;
			inp[i] = v1x*v2x + v1y*v2y;
//			cout << "inp[" << i << "]: " << inp[i] << endl;
			
			inp[i] /= sqrt (v1x*v1x + v1y*v1y)*sqrt (v2x*v2x + v2y*v2y);
//			cout << "inp[" << i << "]: " << inp[i] << endl;
		} // end for

		for (i = 0; i < 4; ++i){
			if (inp[i] < 0.){
				break;
			} // end if
		} // end for

		if (i == 4){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if

	} // end while
		
	return 0;
}

C++: #include<stdio.h>
int main(){
	double ax,ay,bx,by,cx,cy,dx,dy;
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)){
		if(
		((ax-cx)*(by-ay)+(ay-cy)*(ax-bx))*
		((ax-cx)*(dy-ay)+(ay-cy)*(ax-dx))<=0&&
		((bx-dx)*(ay-by)+(by-dy)*(bx-ax))*
		((bx-dx)*(cy-by)+(by-dy)*(bx-cx))<=0)printf("YES\n");
		else printf("NO\n");
	}
}

C++: #include<cstdio>
main(){
double a,A,b,B,c,C,d,D,v,V,w,W,x,X,y,Y;
for(;~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&A,&b,&B,&c,&C,&d,&D);){
v=b-a;V=B-A;
w=c-b;W=C-B;
x=d-c;X=D-C;
y=a-d;Y=A-D;
puts(v*W-V*w>0&&w*X-W*x>0&&x*Y-X*y>0&&y*V-Y*v>0?"YES":"NO");
}}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
#define EPS (1e-10)
#define equal(a,b) (fabs((a)-(b)) < EPS)
const int MAX = 1e5;

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 abs(){
        return sqrt(norm());
    }
    double norm(){
        return x*x+y*y;
    }
    bool operator < (const Point &p)const{
        return x != p.x ? x < p.x : y < p.y;
    }
    
    bool operator == (const Point &p){
        return equal(x,p.x)&&equal(y,p.y);
    }
};

typedef Point Vector;

double dot(Vector a,Vector b){
    return a.x*b.x + a.y*b.y;
}

double cross(Vector a,Vector b){
    return a.x*b.y - b.x*a.y;
}

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 ){
    Vector a = p1 - p0;
    Vector 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.norm() < b.norm() ) return ONLINE_FRONT;
    return ON_SEGMENT;
}

typedef vector<Point> Polygon;

Polygon andrewScan(Polygon s){
    Polygon u,l;
    
    if(s.size() < 3) return s;
    sort(s.begin(),s.end());
    
    u.push_back(s[0]);
    u.push_back(s[1]);
    l.push_back(s[s.size()-1]);
    l.push_back(s[s.size()-2]);
    
    for(int i = 2 ; i < s.size() ; i++){
        for(int n = u.size() ; n >=2 && ccw(u[n-2],u[n-1],s[i]) != CLOCKWISE; n--){
            u.pop_back();
        }
        u.push_back(s[i]);
    }
    
    for(int i = s.size()-3 ; i >= 0 ; i--){
        for(int n = l.size() ; n >=2 && ccw(l[n-2],l[n-1],s[i]) != CLOCKWISE; n--){
            l.pop_back();
        }
        l.push_back(s[i]);
    }
    
    reverse(l.begin(),l.end());
    
    for(int i = u.size() -2 ; i >= 1 ; i--){
        l.push_back(u[i]);
    }
    
    return l;
}

int main(){
    Point p1,p2,p3,p4;
    
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf"
                ,&p1.x,&p1.y,&p2.x,&p2.y,&p3.x,&p3.y,&p4.x,&p4.y) != EOF){
        Polygon pp;
        pp.push_back(Point(p1.x,p1.y)); pp.push_back(Point(p2.x,p2.y));
        pp.push_back(Point(p3.x,p3.y)); pp.push_back(Point(p4.x,p4.y));
        if(!(4-andrewScan(pp).size())) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
 
    return 0;
}