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>
#define EPS (1e-10)
#define equals(a,b)(fabs((a)-(b))<EPS)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

struct Point {
	double x, y;
	Point(double x = 0, double y = 0) :x(x), y(y) {}
	Point operator*(double a) { return Point(a*x, a*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); }
	double norm() { return x*x + y*y; }
};
typedef vector<Point>Polygon;
struct Segment {
	Point p1, p2;
};
double cross(Point a, Point b) {
	return a.x*b.y - a.y*b.x;
}
double dot(Point a, Point b) {
	return a.x*b.x + a.y*b.y;
}
bool isPrallel(Segment s1, Segment s2) {
	return equals(cross(s1.p2 - s1.p1, s2.p2 - s2.p1), 0.0);
}
bool isOrthogonal(Segment s1, Segment s2) {
	return equals(dot(s1.p2 - s1.p1, s2.p2 - s2.p1), 0.0);
}
int contains(Polygon g, Point p) {
	int n = g.size();
	bool x = false;
	rep(i, n) {
		Point a = g[i] - p, b = g[(i + 1) % n] - p;
		if (abs(cross(a, b)) < EPS&&dot(a, b) < EPS)return 1;
		if (a.y > b.y)swap(a, b);
		if (a.y < EPS&&EPS<b.y&&cross(a, b)>EPS)x = !x;
	}
	return x ? 2 : 0;
}
int ccw(Point p0, Point p1, Point p2) {
	Point a = p1 - p0;
	Point b = p2 - p0;
	if (cross(a, b) > EPS)return 1;
	if (cross(a, b) < -EPS)return -1;
	if (dot(a, b) < -EPS)return 2;
	if (a.norm() < b.norm())return -2;
	return 0;
}
bool intersect(Point p1, Point p2, Point p3, Point p4) {
	return (ccw(p1, p2, p3)*ccw(p1, p2, p4) <= 0 &&
		ccw(p3, p4, p1)*ccw(p3, p4, p2) <= 0);
}
bool intersect(Segment s1, Segment s2) {
	return intersect(s1.p1, s1.p2, s2.p1, s2.p2);
}
Point project(Segment s, Point p) {
	Point base = s.p2 - s.p1;
	double r = dot(p - s.p1, base) / base.norm();
	return s.p1 + base*r;
}
Point reflect(Segment s, Point p) {
	return p + (project(s, p) - p)*2.0;
}
bool isconvex(Polygon g) {
	int back = 3;
	rep(i, g.size()) {
		int d = ccw(g[(i + g.size() - 1) % g.size()], g[i], g[(i + 1) % g.size()]);
		if (back != 3 && d != back)
			return false;
		else back = d;
	}
	return true;
}
int main() {
	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)) {
		Polygon g = { {xa,ya},{xb,yb},{xc,yc},{xd,yd} };
		puts(isconvex(g) ? "YES" : "NO");
	}
}

C++: #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define rep(i,n) for(int i = 0;i < n;i++)
#define P(p) cout<<(p)<<endl;
#define pi 3.1415926535
using namespace std;
typedef long long ll;
int dx[] = { 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0 };

unsigned long long sttoi(std::string str) {
	unsigned long long ret;
	std::stringstream ss; ss << str;
	ss >> ret;
	return ret;
}

ll gcd(ll a, ll b){
	if (b > a)swap(a, b); if (b == 0)return a; else{ return gcd(b, a%b); }
}

double rad(double ax,double ay,double bx,double by,double cx,double cy){
	double px, py, qx, qy;
	px = bx - ax;
	qx = bx - cx;
	py = by - ay;
	qy = by - cy;
	return (px*py + qx*qy) / (sqrt((px*px + qx*qx)*(py*py + qy*qy)));
}

void solve() {
	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])){
		double sum = 0.0;
		for (int i = 0; i < 4; i++){
			sum += acos(rad(x[i % 4], y[i % 4], x[i + 1 % 4], y[i + 1 % 4], x[i + 2 % 4], y[i + 2 % 4]));
		}
		if (sum < 2*pi){
			P("NO");
		}
		else{
			P("YES");
		}
	}
}

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

C++: #include <bits/stdc++.h>

#define PI 3.14159265358979

using namespace std;

int main()
{
	string str;
	while(cin >> str)
	{
		double x[4],y[4];
		string keep;
		vector<string>set;
		int flag=0;
		double a[4];
		double s[4];
		int j=0;

		for(int i=0;i<=str.length();i++)
		{
			if(str[i]==',' || str.length()==i)
			{
				set.push_back(keep);
				keep.clear();
			}
			else keep+=str[i];
		}

		stringstream ss;
		for(int i=0,j=0;i<4;i++,j+=2)
		{
			ss << set[j];
			ss >> x[i];

			ss.clear();
			ss.str("");

			ss << set[j+1];
			ss >> y[i];

			ss.clear();
			ss.str("");
		}

		for(int i=0;i<4;i++)
		{
			if(x[(i+1)%4]-x[i]!=0)a[i]=(y[(i+1)%4]-y[i])/(x[(i+1)%4]-x[i]);
			else a[i]=9999999;
		}

		double sum=0;
		for(int i=0;i<4;i++)
		{
			double set[100]={};

			set[0]=fabs(a[i]*a[(i+1)%4]+1);
			set[1]=sqrt(a[i]*a[i]+1);
			set[2]=sqrt(a[(i+1)%4]*a[(i+1)%4]+1);

			if(set[1]*set[2]==0)s[i]=90;
			else s[i]=acos(set[0]/(set[1]*set[2]))*180/PI;

			sum+=s[i];
		}
		if(fabs(360-sum)>=179.9999)cout << "NO" << endl;
		else cout << "YES" << endl;
	}


	return 0;
}

C++: #include <stdio.h>
#include <math.h>

#define PI (3.14159265358979)
#define  rad2deg(_a) ((_a) / PI * 180.0)

int
main(void)
{
	char line[80];

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

	while (true) {
		if (fgets(line, sizeof line, stdin) == NULL) {
			break;
		}
		if (sscanf(line, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,",
				   &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != 8) {
			break;
		}

		double ab = sqrt(pow(xa-xb, 2) + pow(ya-yb, 2));
		double bc = sqrt(pow(xb-xc, 2) + pow(yb-yc, 2));

		double ac = sqrt(pow(xa-xc, 2) + pow(ya-yc, 2));

		double cd = sqrt(pow(xc-xd, 2) + pow(yc-yd, 2));
		double ad = sqrt(pow(xa-xd, 2) + pow(ya-yd, 2));

		double A0 = rad2deg(acos((ab*ab + ac*ac - bc*bc)/ (2*ab*ac)));
		double B  = rad2deg(acos((ab*ab + bc*bc - ac*ac)/ (2*ab*bc)));
		double C0 = rad2deg(acos((ac*ac + bc*bc - ab*ab)/ (2*ac*bc)));

		double A1 = rad2deg(acos((ad*ad + ac*ac - cd*cd)/ (2*ad*ac)));
		double C1 = rad2deg(acos((ac*ac + cd*cd - ad*ad)/ (2*ac*cd)));
		double D  = rad2deg(acos((ad*ad + cd*cd - ac*ac)/ (2*ad*cd)));

		if ((A0+A1) > 180 || B > 180 || (C0+C1) > 180 || D > 180) {
			printf("NO\n");
		} else {
			printf("YES\n");
		}
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <sstream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define bitcount(b) __builtin_popcount(b)

struct P{double x,y;};


double euc(P a,P b){
	a.x-=b.x;
	a.y-=b.y;
	return sqrt( a.x * a.x + a.y * a.y );
}

double tri(P a,P b,P c){	
	a.x -= c.x, a.y -= c.y;
	b.x -= c.x, b.y -= c.y;
	c.x -= c.x; c.y -= c.y;
	
	return fabs(b.x * a.y - a.x * b.y) / 2.0;
}

int main(){
	vector<P> d(4);
	string line;
	while( getline(cin,line) ){
		while(~line.find(","))line[line.find(",")] = ' ';
		stringstream ss(line);
		rep(i,4){
			if( ss >> d[i].x >> d[i].y );
			else return 0;
		}
		double sum = 0;
		
		sum = tri(d[0],d[1],d[2]) + tri(d[1],d[2],d[3]);
		
		bool flag = true;
		
		rep(i,1<<4){
		
			if(bitcount(i) != 3)continue;
			
			vector<P> t;
			
			rep(j,4){
				if( i & (1<<j) ){
					t.push_back(d[j]);	
				}
			}
			if( tri(t[0],t[1],t[2]) > sum ){
				flag = false;
			}
		}
		cout << (flag?"YES":"NO") << endl;
	}
}