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;
 
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<cmath>
using namespace std;
//凹んでたら小さい方の角をとってしまう
//内角の和が360度か
double check(double x1, double y1, double x2, double y2, double x3, double y3) {
    double e1 = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
    double e2 = sqrt(pow(x3 - x2, 2) + pow(y3 - y2, 2));
    double e3 = sqrt(pow(x3 - x1, 2) + pow(y3 - y1, 2));
    double Cos = (e1 * e1 + e2 * e2 - e3 * e3) / (2 * e1 * e2);
    double PI = (double)acos(-1);
    return acos(Cos) * 180 / PI;
}
int main() {
    double xa, ya, xb, yb, xc, yc, xd, yd;
    char c;
    while (cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd) {
        double r1, r2, r3, r4;
        r1 = check(xa, ya, xb, yb, xc, yc);
        r2 = check(xb, yb, xc, yc, xd, yd);
        r3 = check(xc, yc, xd, yd, xa, ya);
        r4 = check(xd, yd, xa, ya, xb, yb);
        double sum =  r1 + r2 + r3 + r4;
        if (sum >= 359.999 && sum <= 360.000) {
            cout << "NO" << endl;
        } else {
            cout << "YES" << endl;
        }
    }
    return 0;
}

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

typedef long double ld;

const ld EPS = 1e-9;
const ld INF = 1e10;
const ld PI = M_PI;

struct Point{
  ld x, y;
  Point(ld x, ld y):x(x), y(y){}
  Point(){}
};

bool eq(ld a, ld b){
  return abs(a-b) < EPS;
}

Point operator+(const Point &a, const Point &b){
  return Point(a.x + b.x, a.y + b.y);
}
Point operator-(const Point &a, const Point &b){
  return Point(a.x - b.x, a.y - b.y);
}
Point operator*(const Point &a, const ld b){
  return Point(a.x * b, a.y * b);
}
Point operator*(const Point &a, const Point &b){
  return Point(a.x*b.x-a.y*b.y, a.x*b.y+a.y*b.x);
}
Point operator/(const Point &a, const ld b){
  return Point(a.x / b, a.y / b);
}

typedef vector<Point> Polygon;

Point next(const Polygon &a, int x){
  return a[(x+1)%a.size()];
}
Point prev(const Polygon &a, int x){
  return a[(x-1+a.size()) % a.size()];
}

ld cross(const Point &a, const Point &b){
  return a.x*b.y - a.y*b.x;
}

ld dot(const Point &a, const Point &b){
  return a.x*b.x + a.y*b.y;
}

ld norm(const Point &a){
  return dot(a, a);
}

int ccw(Point a, Point b, Point c){
  b = b - a;
  c = c - a;
  if(cross(b, c) > EPS) return +1; // 反時計周り
  if(cross(b, c) < -EPS) return -1; // 時計周り
  if(dot(b, c) < 0) return +2; // c -- a -- b がこの順番に一直線上
  if(norm(b) < norm(c)) return -2; // a -- b -- c がこの順番に一直線上
  return 0; // a -- c -- b が一直線上
}

bool compare(const Point &a, const Point &b){
  if(eq(a.y, b.y)) return a.x < b.x;
  return a.y < b.y;
}

Polygon convex_hull(Polygon ps){
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end(), compare);
  Polygon ch(2*n);
  for(int i = 0 ; i < n ; i++){
    while(k > 1 && ccw(ch[k-2], ch[k-1], ps[i]) == -1) --k;    
    ch[k++] = ps[i];
  }
  int t = k;
  for(int i = n-2 ; i >= 0 ; i--){
    while(k > t && ccw(ch[k-2], ch[k-1], ps[i]) == -1) --k;
    ch[k++] = ps[i];
  }
  ch.resize(k-1);
  return ch;
}

int main(){
  ld xa, ya, xb, yb, xc, yc, xd, yd;
  char c;
  while(cin >> xa >> c >> ya >> c >> xb >>
	c >> yb >> c>> xc >> c >> yc >> c >> xd >> c >> yd){
    Polygon poly;
    poly.push_back(Point(xa, ya));
    poly.push_back(Point(xb, yb));
    poly.push_back(Point(xc, yc));
    poly.push_back(Point(xd, yd));
    Polygon ans = convex_hull(poly);
    
    cout << (ans.size() == 4 ? "YES" : "NO") << endl;
  }
  
  return 0;
}