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;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 30;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };
 
bool collision_detection( double x1, double y1, double x2, double y2, double x3, double y3, double xp, double yp ) {
    x2 -= x1;
    x3 -= x1;
    xp -= x1;
    y2 -= y1;
    y3 -= y1;
    yp -= y1;
    double t_size = fabs( ( x2 * y3 - y2 * x3 ) / 2 );
    t_size -= fabs( ( x2 * yp -  y2 * xp ) / 2 );
    t_size -= fabs( ( x3 * yp -  y3 * xp ) / 2 );
    x2 -= xp;
    x3 -= xp;
    y2 -= yp;
    y3 -= yp;
    yp = xp = 0;
    t_size -= fabs( ( x2 * y3 - y2 * x3 ) / 2 );
    return fabs( t_size ) < 1e-10;
}
 
int main() {
    double x[ 4 ], y[ 4 ];
    while ( ~scanf( "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x[ 0 ], &y[ 0 ], &x[ 1 ], &y[ 1 ], &x[ 2 ], &y[ 2 ], &x[ 3 ], &y[ 3 ] ) ) {
        bool print_yes = true;
        for ( int i = 0; i < 4; i++ ) {
            if ( collision_detection( x[ ( i + 1 ) % 4 ], y[ ( i + 1 ) % 4 ], x[ ( i + 2 ) % 4 ], y[ ( i + 2 ) % 4 ], x[ ( i + 3 ) % 4 ], y[ ( i + 3 ) % 4 ], x[ i ], y[ i ] ) ) {
                print_yes = false;
                break;
            }
        }
        printf( "%s\n", print_yes ? "YES" : "NO" );
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;

const double EPS = 1e-6;

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);
	}

	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));
}

// 2直線の直行判定
bool line_orth(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).dot(b1 - b2)) < EPS;
}

// 2直線の平行判定
bool line_paral(P a1, P a2, P b1, P b2) {
	return fabs((a1 - a2).det(b1 - b2)) < EPS;
}

// 進行方向
int ccw(P a, P b, P c) {
	b = b - a; c = b - c;
	if (b.det(c) > 0)
		return +1;
	else if (b.det(c) < 0)
		return -1;
	return 0;
}

int main(void) {
	string str;
	while (getline(cin, str)) {
		replace(str.begin(), str.end(), ',', ' ');
		stringstream buf(str);
		P p[4];
		for (int i = 0; i < 4; i++) {
			buf >> p[i].x >> p[i].y;
		}

		int cnt = 0, n = 0;
		for (int i = 0; i < 4; i++) {
			int c = ccw(p[i], p[(i+1)%4], p[(i+2)%4]);
			cnt += c;
			n += abs(c);
		}

		//cout << cnt << " " << n << " ";
		cout << (abs(cnt) == n ? "YES" : "NO") << endl;
	}
}

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

int main(void){
  double x[4], y[4];
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", x, y, x+1, y+1, x+2, y+2, x+3, y+3) != EOF){
    bool convex = false;
    for(int i = 0; i < 3; i++){
      double x1, y1, x2, y2;
      x1 = x[i+1] - x[i]; y1 = y[i+1] - y[i];
      x2 = x[(i+2)%4] - x[i+1]; y2 = y[(i+2)%4] - x[i+1];
      double a, b;
      a = sqrt(x1 * x1 + y1 * y1);
      b = sqrt(x2 * x2 + y2 * y2);
      double sin = (x1 * y2 - x2 * y1) / (a * b);
      if(sin < 0) { convex = true; break; }
    }
    if(convex) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <complex>

bool read_data(std::complex<double>* points)
{
	double coords[8];
	for (int i = 0; i < 8; ++i) {
		if (scanf((i==0) ? "%lf" : ",%lf", &coords[i]) != 1) {
			return false;
		}
	}
	for (int i = 0; i < 4; ++i) {
		points[i] = std::complex<double>(coords[i*2], coords[i*2+1]);
	}
	return true;
}


int main()
{
	std::complex<double> points[4];
	while (read_data(points)) {
		double imag[4] = {};
		for (int i = 0; i < 4; ++i) {
			imag[i] = ((points[(i+2)%4]-points[(i+1)%4])/(points[i%4]-points[(i+1)%4])).imag();
		}
		if ((imag[0] > 0 && imag[1] > 0 && imag[2] > 0 && imag[3] > 0) || 
			(imag[0] < 0 && imag[1] < 0 && imag[2] < 0 && imag[3] < 0))
		{
			std::cout << "YES\n";
		} else {
			std::cout << "NO\n";
		}
	}

	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>
#include<cmath>

double spase(double a,double b,double c){
	return sqrt((a+b+c)*(b-a+c)*(a-b+c)*(a+b-c));
}

int main(){
	double a,b,c,d,e,f,g,h,AB,BC,CD,DA,AC,BD,abc,bcd,cda,dab;
	while( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a,&b,&c,&d,&e,&f,&g,&h) != EOF ){
		AB=sqrt((a-c)*(a-c)+(b-d)*(b-d));
		BC=sqrt((c-e)*(c-e)+(d-f)*(d-f));
		CD=sqrt((e-g)*(e-g)+(f-h)*(f-h));
		DA=sqrt((g-a)*(g-a)+(h-b)*(h-b));
		AC=sqrt((a-e)*(a-e)+(b-f)*(b-f));
		BD=sqrt((c-g)*(c-g)+(d-h)*(d-h));
		abc=((a-c)*(c-e)+(b-d)*(d-f))/AB/BC;
		bcd=((c-e)*(e-g)+(d-f)*(f-h))/BC/CD;
		cda=((e-g)*(g-a)+(f-h)*(h-b))/CD/DA;
		dab=((g-a)*(a-c)+(h-b)*(b-b))/DA/AB;
		abc=acos(abc)+acos(bcd)+acos(cda)+acos(dab);
		if(((float)abc==2*M_PI)&&((float)(spase(AB,BC,AC)+spase(CD,DA,AC)-spase(DA,AB,BD)-spase(CD,BC,BD))==0)){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}