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 <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
	freopen("testcase.ic", "r", stdin);
	string str = "";

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		vector <double> x (4, 0. );
		vector <double> y (4, 0. );
		vector <double> vx (4, 0. );
		vector <double> vy (4, 0. );

		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss(str);
		int i;

		for (i = 0; i < 4; ++i){
			ss >> x[i] >> y[i];
		} // end for
		
		for (i = 0; i < 4; ++i){
			vx[i] = x[(i+1) % 4] - x[i];
			vy[i] = y[(i+1) % 4] - y[i];
//			cout << "v[" << i << "]: " << '(' << vx[i] << ',';
//			cout << vy[i] << ')' << endl;
		} // end for
		vector <double> exp (4, 0.);
		for (i = 0; i < 4; ++i){
//			double v2x = x[(i+2) % 4] - x[i];
//			double v2y = y[(i+2) % 4] - y[i];
			double v2x = vx[(i+1) % 4] + vx[i];
			double v2y = vy[(i+1) % 4] + vy[i];
			double v1x = vx[i];
			double v1y = vy[i];
//			cout << "v2" << '(' << v2x << ',' << v2y << ')' << endl;
//			cout << "v1" << '(' << v1x << ',' << v1y << ')' << endl;
			exp[i] = v1x*v2y - v1y*v2x;
//			cout << "inp[" << i << "]: " << inp[i] << endl;
			
//			inp[i] /= sqrt (v1x*v1x + v1y*v1y)*sqrt (v2x*v2x + v2y*v2y);
//			cout << "inp[" << i << "]: " << inp[i] << endl;
		} // end for

		for (i = 0; i < 4; ++i){
			if (exp[i] < 0.){
				break;
			} // end if
		} // end for

		if (i == 4){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if

	} // end while
		
	return 0;
}

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) {
	rep(i, g.size()) {
		int d = ccw(g[(i + g.size() - 1) % g.size()], g[i], g[(i + 1) % g.size()]);
		if (d != 1 && d != -2)
			return false;
	}
	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))
		puts(isconvex({ {xa,ya},{xb,yb},{xc,yc},{xd,yd} }) ? "YES" : "NO");
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

//三角形面積（三点から）
double smen(double x1, double y1, double x2, double y2, double x3, double y3){
	return abs((x3-x2) * (y1-y2) - (x1-x2)*(y3-y2) )* 0.5;
	
}


int main(void){

int x[4] ,y[4];
char c;

	while(scanf("%f,%f,%f,%f,%f,%f,%f,%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3])){
//cin >> x[0]>>c>>y[0]>>c>>x[1]>>c>>y[1]>>c>>x[2]>>c>>y[2]>>c>>x[3]>>c>>y[3];
		 
		double s1 = smen(x[0],y[0],x[1],y[1],x[2],y[2])
					+ smen(x[2],y[2],x[3],y[3],x[0],y[0]);
		double s2 = smen(x[0],y[0],x[1],y[1],x[3],y[3])
					+ smen(x[2],y[2],x[1],y[1],x[3],y[3]);
		cout << ((s1==s2)? "YES":"NO") << endl;
//		cin.clear();

	}
	return 0;
	
	
}

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

using namespace std;

int main(void){

	char gava;
	double xa,ya,xb,yb,xc,yc,xd,yd;
	double a,b;
	int flag;

	while(cin>>xa>>gava>>ya>>gava>>xb>>gava>>yb>>gava>>xc>>gava>>yc>>gava>>xd>>gava>>yd){
		flag=1;

		if(xa-xc==0) a=0;
		else a=(ya-yc)/(xa-xc);
		if(xa*xc==0) b=0;
		else b=(xa*yc-ya*xc)/(xa*xc);
		if(yd<a*xd+b&&yb<a*xb+b||yd>a*xd+b&&yb>a*xb+b) flag=0;

		if(xb-xd==0) a=0;
		else a=(yb-yd)/(xb-xd);
		if(xb*xd==0) b=0;
		else b=(xb*yd-yb*xd)/(xb*xd);
		if(yc<a*xc+b&&ya<a*xa+b||yc>a*xc+b&&ya>a*xa+b) flag=0;

		if(flag==1) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}

	return 0;
}

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

using namespace std;

typedef complex<double> P;

double cross(P a, P b){
  return a.real() * b.imag() - a.imag() * b.real();
}

double dot(P a, P b){
  return a.real() * b.real() + a.imag() * b.imag();
}

int ccw(P a, P b, P c){
  b -= a; c -= a;
  if(cross(b, c) > 0) return 1;
  if(cross(b, c) < 0) return -1;
  if(dot(b, c) < 0) return 2;
  if(norm(b) < norm(c)) return -2;
  return 0;
}

int main()
{
  char j;
  double a,b,c,d,e,f,g,h;
  for(;cin>>a>>j>>b>>j>>c>>j>>d>>j>>e>>j>>f>>j>>g>>j>>h;)
    {
      P x(a,b),y(c,d),z(e,f),p(g,h);
      if(ccw(x,y,z)==ccw(y,z,p) && ccw(y,z,p) == ccw(z,p,x)
	 && ccw(z,p,x) == ccw(p,x,y))
	cout<<"YES"<<endl;
      else
	cout<<"NO"<<endl;
    }
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <map>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;

int main()
{
	double x[4], y[4];
	while(1){
		rep(i, 4){
			if(scanf("%lf,%lf,", &x[i], &y[i]) == EOF)
				return 0;
		}

		bool ok = true;
		rep(i, 4){
			if((x[(i+1)%4]-x[i])*(y[(i+2)%4]-y[i])-(y[(i+1)%4]-y[i])*(x[(i+2)%4]-x[i])<0.0){
				ok = false;
				break;
			}
		}
		puts(ok ? "YES" : "NO");
	}
}