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 <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
// ------ Classes ------ //
class Point {
public:
	long double px, py;
	Point() : px(0), py(0) {};
	Point(long double px_, long double py_) : px(px_), py(py_) {};
	friend bool operator==(const Point& p1, const Point& p2) { return p1.px == p2.px && p1.py == p2.py; }
	friend bool operator!=(const Point& p1, const Point& p2) { return p1.px != p2.px || p1.py != p2.py; }
	friend Point operator+(const Point& p1, const Point& p2) { return Point(p1.px + p2.px, p1.py + p2.py); }
	friend Point operator-(const Point& p1, const Point& p2) { return Point(p1.px - p2.px, p1.py - p2.py); }
	friend Point operator*(const Point& p1, long double d) { return Point(p1.px * d, p1.py + d); }
	friend Point operator*(long double d, const Point& p1) { return p1 * d; }
	friend Point operator/(const Point& p1, long double d) { return Point(p1.px / d, p1.py / d); }
	Point& operator+=(const Point& p1) { px += p1.px; py += p1.py; return *this; }
	Point& operator-=(const Point& p1) { px -= p1.px; py -= p1.py; return *this; }
	Point& operator*=(long double d) { px *= d; py *= d; return *this; }
	Point& operator/=(long double d) { px /= d; py /= d; return *this; }
};
class Segment {
public:
	Point p1, p2;
	Segment(Point p1_, Point p2_) : p1(p1_), p2(p2_) {};
	Segment(long double p1x, long double p1y, long double p2x, long double p2y) : p1(Point(p1x, p1y)), p2(Point(p2x, p2y)) {};
	friend bool operator==(const Segment& s1, const Segment& s2) { return (s1.p1 == s2.p1 && s1.p2 == s2.p2) || (s1.p1 == s2.p2 && s1.p2 == s2.p1); }
	friend bool operator!=(const Segment& s1, const Segment& s2) { return !(s1 == s2); }
};
class Line {
public:
	Point p1, p2;
	Line(Point p1_, Point p2_) : p1(p1_), p2(p2_) {};
	Line(long double p1x, long double p1y, long double p2x, long double p2y) : p1(Point(p1x, p1y)), p2(Point(p2x, p2y)) {};
	friend bool operator==(const Line& s1, const Line& s2) { return (s1.p1 == s2.p1 && s1.p2 == s2.p2) || (s1.p1 == s2.p2 && s1.p2 == s2.p1); }
	friend bool operator!=(const Line& s1, const Line& s2) { return !(s1 == s2); }
};
// ------ Functions ------ //
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double abs(const Point& a) { return sqrtl(norm(a)); }
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
int ccw(Point p0, Point p1, Point p2) {
	Point a = p1 - p0, b = p2 - p0;
	if (crs(a, b) > 1e-10) return 1;
	if (crs(a, b) < -1e-10) return -1;
	if (dot(a, b) < -1e-10) return 2;
	if (norm(a) < norm(b)) return -2;
	return 0;
}
// ------ Main ------ //
Point p1, p2, p3, p4; int r1, r2, r3, r4;
int main() {
	while (~scanf("%Lf,%Lf,%Lf,%Lf,%Lf,%Lf,%Lf,%Lf", p1.px, p1.py, p2.px, p2.py, p3.px, p3.py, p4.px, p4.py)) {
		r1 = ccw(p1, p2, p3);
		r2 = ccw(p2, p3, p4);
		r3 = ccw(p3, p4, p1);
		r4 = ccw(p4, p1, p2);
		printf("%s\n", (r1 == r2 && r2 == r3 && r3 == r4 && abs(r1) == 1) ? "YES" : "NO");
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

const double EPS = 1e-10;

struct Point{
	double x,y;
	Point(){}
	Point(double x,double y) :x(x),y(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);}
	Point operator*(double k){return Point(x*k,y*k);}
	Point operator/(double k){return Point(x/k,y/k);}
	double norm(){return x*x+y*y;}
	double abs(){return sqrt(norm());}

	bool operator < (const Point &p) const{
		return x!=p.x?x<p.x:y<p.y;
	}

	bool operator == (const Point &p) const{
		return fabs(x-p.x)<EPS && fabs(y-p.y)<EPS;
	}
};

typedef Point Vector;


bool EQ(double a, double b) {
	return abs(a - b) < EPS;
}

bool sort_x(Point a,Point b){
	return a.x!=b.x?a.x<b.x:a.y<b.y;
}

double cross(Vector a,Vector b){
	return a.x*b.y-a.y*b.x;
}

vector<Point> convex_hull(vector<Point> ps, int n) {
	sort(ps.begin(), ps.end(), sort_x);
	int k = 0;
	vector<Point> qs(n * 2);

	for (int i = 0; i < n; ++i) {
		while (k > 1 && cross((qs[k - 1] - qs[k - 2]), (ps[i] - qs[k - 1])) <= 0) k--;
		qs[k++] = ps[i];
	}

	for (int i = n - 2, t = k; i >= 0; --i) {
		while (k > t && cross((qs[k - 1] - qs[k - 2]), (ps[i] - qs[k - 1])) <= 0) k--;
		qs[k++] = ps[i];
	}

	qs.resize(k - 1);

	return qs;
}


#define fs first
#define sc second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ") 
{ rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

int main() {
	double a, b;
	char c;
	vector<Point> vi;
	while (cin >> a >> c >> b) {
		vi.clear();
		vi.pb(Point(a, b));
		rep(i, 3) {
			cin >> c >> a >> c >> b;
			vi.pb(Point(a, b));
		}

		vector<Point> po = convex_hull(vi, vi.size());
		cout << (po.size() == vi.size() ? "YES" : "NO") << endl;
	}
}

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, c = 0, d = 0;
		//cout << xa << " " << ya << " " << xb << " " << yb << endl;
		P AB, BC, CD, DA;
		AB.first = xb - xa;
		AB.second = yb - ya;
		//cout << AD.first << " " << AD.second << endl;
		BC.first = xc - xb;
		BC.second = yc - yb;
		a = AB.first*BC.second + (-1)*AB.second*BC.first;
		//cout << a << endl;
		//cout << AB.first << " " << AB.second << endl;
		//cout << BC.first << " " << BC.second << endl;
		CD.first = xd - xc;
		CD.second = yd - yc;
		//cout << CD.first << " " << CD.second << endl;
		b = BC.first*CD.second + (-1)*BC.second*CD.first;

		DA.first = xa - xd;
		DA.second = ya - yd;
		//cout << DA.first << " " << DA.second << endl;
		c = CD.first*DA.second + (-1)*CD.second*DA.first;
		//cout << a << b << d << endl;

		d = DA.first*AB.second + (-1)*DA.second*AB.first;

		//cout << a << b << c << d << endl;

		if((a >= 0 && b >= 0 && c >= 0 && d >= 0) || (a < 0 && b < 0 && c < 0 && d < 0)) cout << "YES" << endl;
		else cout << "NO" << endl;

	}
	return 0;
}