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 <cstdio>
#include <cmath>
#define vertex 4
#define PI (atan(1.0) * 4.0)

using namespace std;

int main(void){
	int i;
	double x[vertex], y[vertex], theta, ax, ay, bx, by, sum;
	while(scanf("%lf%*c%lf%*c",&x[0],&y[0]) != EOF){
		for(i = 1;i < vertex;i++){
			scanf("%lf%*c%lf%*c",&x[i],&y[i]);
		}
		sum = 0;
		for(i = 0;i < vertex;i++){
			ax = x[i] - x[(i + 1) % vertex];
			ay = y[i] - y[(i + 1) % vertex];
			bx = x[(i + 2) % vertex] - x[(i + 1) % vertex];
			by = y[(i + 2) % vertex] - y[(i + 1) % vertex];
			theta = 180 * acos((ax * bx + ay * by) / (sqrt(pow(ax,2.0) + pow(ay,2.0)) * sqrt(pow(bx,2.0) + pow(by,2.0)))) / PI;
			sum += theta;
		}
		if(sum == 360){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#define EPS 1e-10
using namespace std;

struct P{
  double x,y;
};
double det(P&p,P&q,P&r)
{
  return (q.x-p.x)*(r.y - q.y) - (q.y - p.y)*(r.x - q.x); 
}
int main()
{
  while(1){
  P p[4];
  char c;
  for(int i = 0 ; i < 4 ; i++ ){
    if(i != 0)cin >> c;
    cin >> p[i].x >>c>> p[i].y;
    if(cin.eof())return 0;
  }
  int f = 0;
  for(int i = 2 ; i < 6 ; i++ ){
    if(det(p[(i-2)%4],p[(i-1)%4],p[i%4]) < 0.0){
      cout << "NO" << endl;
      f = 1;
      break;
    }
  }
  if(f == 0)cout << "YES" << endl;
  }
  return 0;
}

C++: #include <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
#include<cstdio>
#include<iostream>
using namespace std;
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double inner_product(point a,point b);//内積
double outer_product(point a,point b);//外積
bool vec_parallel(point vec1,point vec2);//ベクトルの並行判定(交差判定falseとしても使える)
bool vec_angle_right(point vec1,point vec2);//ベクトルの直行判定
bool cross_line_segment(line a,point p1,point p2);//直線と線分の交差判定
class point{
public:
double x,y;
point(){
x=0;
y=0;
}
point(double a,double b){
x=a;
y=b;
}
void in(double a,double b){
x=a;
y=b;
return ;
}
};
//直線クラス
class line{
public:
point s,v;
public:
line(point a,point b){
s=a;
v=vec_sub(a,b);
}
};
//ベクトルの足し算
point vec_add(point vec1,point vec2){
point res(vec1.x+vec2.x,vec1.y+vec2.y);
return res;
}
//ベクトルの引き算
point vec_sub(point vec1,point vec2){
point res(vec1.x-vec2.x,vec1.y-vec2.y);
return res;
}
//内積
double inner_product(point a,point b){
return a.x * b.x + a.y * b.y;
}
//外積
double outer_product(point a,point b){
return a.x * b.y - a.y * b.x;
}
point p[6];
bool solve(){
bool judge;
bool ans;
if(outer_product(p[0],p[1])>0){
judge=true;
}else{
judge =false;
}
for(int i=1;i<4;i++){
if(outer_product(p[i],p[i+1])>0){
if(judge!=true) return false;
}else if(outer_product(p[i],p[i+1])==0){
return false;
}else{
if(judge!=false) return false;
}
}
return true;
}
int main(){
while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p[0].x,&p[0].y,&p[1].x,&p[1].y,&p[2].x,&p[2].y,&p[3].x,&p[3].y)!=EOF){
p[4]=p[0];
p[5]=p[1];
for(int i=0;i<5;i++){
p[i]=vec_sub(p[i],p[i+1]);
}
bool ans=solve();
if(ans){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;
typedef pair<double, double> P;

double Helon(P pa, P pb, P pc)
{
	double a, b, c;
	a = sqrt((pb.first - pa.first) * (pb.first - pa.first) + (pb.second - pa.second) * (pb.second - pa.second));
	b = sqrt((pc.first - pb.first) * (pc.first - pb.first) + (pc.second - pb.second) * (pc.second - pb.second));
	c = sqrt((pa.first - pc.first) * (pa.first - pc.first) + (pa.second - pc.second) * (pa.second - pc.second));
	double s = (a + b + c) / 2;
	return(sqrt(s * (s - a) * (s - b) * (s - c)));
}

void solve()
{
	vector<P> p(4);
	while(scanf("%lf,%lf", &p[0].first, &p[0].second))
	{
		for(int i = 1; i < 4; ++i)
		{
			scanf(",%lf,%lf", &p[i].first, &p[i].second);
		}
		double S1, S2;
		S1 = Helon(p[0], p[1], p[2]);
		S1 += Helon(p[0], p[2], p[3]);

		S2 = Helon(p[0], p[1], p[3]);
		S2 += Helon(p[1], p[2], p[3]);
		if(fabs(S1 - S2) < 1e-10)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}