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 iota(i,n,b,s) for(int i=int(b);i!=int(b+s*n);i+=s)
#define range_debug(i,n,m) (n>m?(n-m+1):(m-n+1))<<n<<(n>m?-1:1)
#define range(i,n,m) iota(i,(n>m?(n-m+1):(m-n+1)),n,(n>m?-1:1))
#define rep(i,n) iota(i,n,0,1)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define trace(var) cout<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef long double Real;
typedef pair<Real, Real> P; // Point
typedef pair<P, P> L; // segment or line
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
    os << v[0];
      for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
        return os;
}

/* inner dot */
Real dot(P&a, P&b) {
  return car(a) * car(b) + cdr(a) * cdr(b);
}
Real operator*(P&a, P&b) {
  return car(a) * car(b) + cdr(a) * cdr(b);
}

/* scalar multiple */
P operator*(P a, Real c) {
  return cons(c * car(a), c * cdr(a));
}
P operator*(Real c, P a) {
  return cons(c * car(a), c * cdr(a));
}

P operator/(P a, Real d) {
  return cons(car(a) / d, cdr(a) / d);
}

Real det(P a, P b) {
  return car(a) * cdr(b) - cdr(a) * car(b);
}

/* vector operator */
P operator+(P a, P b) {
  return cons(car(a) + car(b), cdr(a) + cdr(b));
}

P operator-(P a) {
  return cons(-car(a), -cdr(a));
}

P operator-(P a, P b) {
  return cons(car(a) - car(b), cdr(a) - cdr(b));
}

/* distance */
Real Manhattan(P a, P b) {
  return abs(car(a) - car(b)) + abs(cdr(a) - cdr(b));
}
Real Euclidean(P a, P b) {
  P p = a - b;
  return sqrt(pow(car(p), 2) + pow(cdr(p), 2));
}

/* equality with EPS (default: 1e-9) */
bool eq(Real x, Real y) {
  return abs(x - y) < EPS;
}
bool operator==(P a, P b) {
  return eq(car(a), car(b)) && eq(cdr(a), cdr(b));
}

int sign(Real a) {
  if (eq(a, 0)) return 0;
  return a > 0 ? 1 : -1;
}

enum CCW {
  FRONT,
  BACK,
  RIGHT,
  LEFT,
  ON
};
CCW ccw(L&l, P&p) {
  P u = car(l);
  P v = cdr(l);

  P dif = p - u;
  P dir = v - u;

  if (eq(0, car(dir))) {
    if (eq(0, car(dif))) {
      Real k = cdr(dif) / cdr(dir);
      if (k > 1.0) return FRONT;
      if (k < 0.0) return BACK;
      return ON;
    } else {
      if (det(dir, dif) > 0.0) {
        return LEFT;
      }
      return RIGHT;
    }
  }

  Real k = car(dif) / car(dir);
  if (eq(cdr(dir) * k, cdr(dif))) {
    if (k > 1.0) return FRONT;
    if (k < 0.0) return BACK;
    return ON;
  } else {
    if (det(dir, dif) > 0.0) {
      return LEFT;
    }
    return RIGHT;
  }
}

Real magnitude(P&a) {
  return sqrt(pow(car(a), 2) + pow(cdr(a), 2));
}

Real arg(P a, P b) {
  Real x = dot(a, b) / magnitude(a) / magnitude(b);
  x = min<Real>(1, max<Real>(-1, x));
  return acos(x);
}

int arg_sign(P&a, P&b, P&c) {
  P x = b - a;
  P y = c - a;
  Real d = det(x, y);
  return d == 0 ? 0 : d < 0 ? 1 : -1;
}

inline
bool all(vector<int>&v, int x) {
  for (int y : v) {
    if (x != y) return false;
  } return true;
}

int main() {
more:
  Real x1, y1, x2, y2, x3, y3, x4, y4;
  char comma;

  cin >> x1;
  if (!cin) return 0;
  cin >> comma >> y1;
  cin >> comma >> x2;
  cin >> comma >> y2;
  cin >> comma >> x3;
  cin >> comma >> y3;
  cin >> comma >> x4;
  cin >> comma >> y4;

  P A(x1, y1);
  P B(x2, y2);
  P C(x3, y3);
  P D(x4, y4);

  vector<int> v(4);
  v[0] = arg_sign(A, B, C);
  v[1] = arg_sign(B, C, D);
  v[2] = arg_sign(C, D, A);
  v[3] = arg_sign(D, A, B);

  if (all(v, 1) || all(v, -1)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  //cout << v << endl;

  goto more;

}

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) || (a < 0 && b < 0 && d < 0)) cout << "NO" << endl;
		else cout << "YES" << endl;

	}
	return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

bool check(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {
	double res1 = (y2-y1)*(x3-x1)/(x2-x1)-(y3-y1), res2 = (y2-y1)*(x4-x1)/(x2-x1)-(y4-y1);
	if (res1 > 0 && res2 > 0) return false;
	if (res1 < 0 && res2 < 0) return false;
	if (res1 == 0 || res2 == 0) return false;
	return true;

}
int main() {
	double a,b,c,d,e,f,g,h;
	while (scanf("%f,%f,%f,%f,%f,%f,%f,%f\n",&a,&b,&c,&d,&e,&f,&g,&h)!=EOF) {
		if (check(a,b,e,f,c,d,g,h) && check(c,d,g,h,a,b,e,f)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}