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++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>
#include <climits>
#include <set>
#include <numeric>

using namespace std;

typedef complex<double> P;
double sq(double x){return x*x;}

double dot(P x,P y){
	return x.real() * y.real() + x.imag() * y.imag();
}

int main(){
	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)){
		P p[4];
		for (int i = 0; i < 4; i++)
			p[i] = P(x[i],y[i]);
		bool f = true;
		for (int i = 0; i < 4; i++)
		{
			if(dot(p[i] - p[(i+1)&3],p[(i+2)&3] - p[(i+1)&3]) < 0)
				f = false;
		}
		if(f) puts("YES");
		else puts("NO");

	}

	return 0;
}

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

class Point{
public:
	Point();
	Point(double _x, double _y);
	double x, y;
};

Point::Point() : x(0), y(0){}
Point::Point(double _x, double _y) : x(_x), y(_y){}

class Vector{
	//private:

public:
	Vector();
	Vector(double _x, double _y);
	Vector(Point p1, Point p2);
	double x, y;
};

Vector::Vector() : x(0), y(0){}
Vector::Vector(double _x, double _y) : x(_x), y(_y){}
Vector::Vector(Point p1, Point p2) : x(p1.x-p2.x), y(p1.y-p2.y){}

int extproduct(Vector v1, Vector v2){
	return v1.x*v2.y - v1.y*v2.x;
}

int main(){
	Point ps[4];
	while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &ps[0].x, &ps[0].y, &ps[1].x, &ps[1].y, &ps[2].x, &ps[2].y, &ps[3].x, &ps[3].y)){
		int res = 0;
		for(int i=0;i<4;i++){
			int count = 0;
			Vector vs[4];
			vs[0] = Vector(ps[(i+1)%4], ps[(i+2)%4]);
			vs[1] = Vector(ps[(i+2)%4], ps[(i+3)%4]);
			vs[2] = Vector(ps[(i+1)%4], ps[(i+3)%4]);
			for(int j=0;j<3;j++){
				vs[3] = Vector(ps[(i+j+1)%4], ps[i]);
				if(extproduct(vs[j], vs[3]) > 0)count++;
				else count--;
			}
			if(count == 3 || count == -3)res++;
		}
		if(res == 4)puts("YES");
		else puts("NO");
	}
}

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

using namespace std;

int main(void){

	double xa,ya,xb,yb,xc,yc,xd,yd;
	double sikaku;

	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
		sikaku=abs(((xa*yb+xb*yc+xc*yd+xd*ya)-(xb*ya+xc*yb+xd*yc+xa*yd))/2);
		xb-=xa,xc-=xa,xd-=xa,xa=0;
		yb-=ya,yc-=ya,yd-=ya,ya=0;
		if(sikaku==(abs((xb*yc-yb*xc)/2)+abs((xc*yd-yc*xd)/2))){
			xa-=xd,xb-=xd,xc-=xd,xd=0;
			ya-=yd,yb-=yd,yc-=yd,yd=0;
			if(sikaku==(abs((xb*ya-yb*xa)/2)+abs((xc*yb-yc*xb)/2))) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else cout<<"NO"<<endl;

	}

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for(int i=0;i<(int)(n);++i)
#define rep1(i, n) for(int i=1;i<=(int)(n);++i)
#define irep(i, a, n) for(int i=a;i<(int)(n);++i)
#define rrep(i, n) for(int i=(int)(n)-1;i>=0;--i)
#define rrep1(i, n) for(int i=(int)(n);i>=1;--i)
#define allrep(V, v) for(auto&& V:v)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const int INF=1<<29;
const double EPS=1e-9;
using namespace std;


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){
    double area1,area2;
    area1=abs((xa-xb)*(yc-yb)-(ya-yb)*(xc-xb))+abs((xa-xd)*(yc-yd)-(ya-yd)*(xc-xd));
    area2=abs((xb-xa)*(yd-ya)-(yb-ya)*(xd-xa))+abs((xb-xc)*(yd-yc)-(yb-yc)*(xd-xc));

    cout << (area1==area2 ? "YES" : "NO") << endl;
  }
  return 0;
}

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

using namespace std;

double EPS = 1e-10;

//誤差を考慮して足し算を行う
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);
	}
	double dot(P p) {	//　内積
		return add(x * p.x, y * p.y);
	}
	double det(P p) {	//　外積
		return add(x * p.y, -y * p.x);
	}
};

//　線分p1-p2上に点qがあるか判定
bool on_seg(P p1, P p2, P q) {
		return (p1 - q).det(p2 - q) == 0 && (p1 - q).dot(p2 - q) <= 0;
}

//　直線p1-p2と直線q1-q2の交点
P intersection(P p1, P p2, P q1, P q2) {
	return p1 + (p2 - p1) * ((q2 - q1).det(q1 - p1) / (q2 - q1).det(p2 - p1));
}

int ccw(P a, P b, P c) {
	a = b - a;
	b = c - b;

	if(a.det(b) < 0) {
		return -1;
	} else if(a.det(b) > 0) {
		return 1;
	} else if(a.det(b) == 0) {
		return 0;
	}
}


int main() {

	P a, b, c, d;
	char dummy;

	while ( cin >> a.x >> dummy >> a.y >> dummy >> b.x >> dummy >> dummy >> b.y >> dummy >> c.x >> dummy >> c.y >> dummy >> d.x >> dummy >> d.y ) {
		int count = 0, ans = 0;
		count += ccw(a, b, c);
		ans += abs(ccw(a, b, c));
		count += ccw(b, c, d);
		ans += abs(ccw(b, c, d));
		count += ccw(c, d, a);
		ans += abs(ccw(c, d, a));
		count += ccw(d, a, b);
		ans += abs(ccw(d, a, b));

		if(abs(count) == ans) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

#define EPS 1e-5

struct point{
	double x;
	double y;
};

struct line{
	double a; // 傾き
	double b; // y切片
};

istream& operator >> ( istream& s , point& p );
bool get_convex( const point& a , const point& b , const point& c , const point& d );

int main(void)
{
	point a, b, c, d;

	while(1)
	{
		cin >> a >> b >> c >> d;
		if( cin.eof() ) break;
		if( get_convex( a , b , c , d ) ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

istream& operator >> ( istream& s , point& p )
{
	return s >> p.x >> p.y;
}

bool get_convex( const point& a , const point& b , const point& c , const point& d )
{
	point a_c, a_b, a_d;
	point b_d, b_a, b_c;

	a_c.x = c.x-a.x; a_c.y = c.y-a.y;
	a_b.x = b.x-a.x; a_b.y = b.y-a.y;
	a_d.x = d.x-a.x; a_d.y = d.y-a.y;
	b_d.x = d.x-b.x; b_d.y = d.y-b.y;
	b_a.x = a.x-b.x; b_a.y = a.y-b.y;
	b_c.x = c.x-b.x; b_c.y = c.y-b.y;

	bool result_a, result_b;

	result_a = ( ( a_c.x * a_b.y - a_b.x * a_c.y ) * ( a_c.x * a_d.y - a_d.x * a_c.y ) < 0 );
	result_b = ( ( b_d.x * b_a.y - b_a.x * b_d.y ) * ( b_d.x * b_c.y - b_c.x * b_d.y ) < 0 );

	if( result_a == true && result_b == true ) return true;
	else return false;
}