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 <string>
#include <sstream>
#include <complex>
using namespace std;
 
class Solver {
private:
    complex<double> z[4];
public:
    bool input() {
        string str;
        if(!getline(cin, str)) return false;
        for(unsigned int i=0; i<str.size(); i++) {
            if(str[i] == ',') str[i] = ' ';
        }
        stringstream ss(str);
        double x, y;
        for(int i=0; i<4; i++) {
            if(!(ss >> x >> y)) return false;
            z[i].real(x);
            z[i].imag(y);
        }
        return true;
    }
    bool isConvex() {
        return (cross(z[1]-z[0], z[2]-z[1]) > 0
                && cross(z[2]-z[1], z[3]-z[2]) > 0
                && cross(z[3]-z[2], z[0]-z[3]) > 0
                && cross(z[0]-z[3], z[1]-z[0]) > 0)
                || (cross(z[1]-z[0], z[2]-z[1]) < 0
                && cross(z[2]-z[1], z[3]-z[2]) < 0
                && cross(z[3]-z[2], z[0]-z[3]) < 0
                && cross(z[0]-z[3], z[1]-z[0]) < 0);
    }
    double cross(complex<double> z1, complex<double> z2) {
        return z1.real()*z2.imag() - z1.imag()*z2.real();
    }
};
 
int main(int argc, char** argv) {
    Solver solver;
    while(solver.input()) {
        if(solver.isConvex()) {
            cout << "YES" << endl;
        }else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  double x[6];
  double y[6];
  while(~scanf("%lf,%lf,",&x[1],&y[1])){
    REP(i,3) scanf("%lf,%lf,",&x[i+2],&y[i+2]);
    x[5] = x[1];
    x[0] = x[4];
    y[5] = y[1];
    y[0] = y[4];
    bool ans = true;
    //REP(i,6) cout << p[i] << endl;
    REP(i,4){
      double dx1 = x[i+1] - x[i];
      double dx2 = x[i+2] - x[i+1];
      double dy1 = y[i+1] - y[i];
      double dy2 = y[i+2] - y[i+1];
      double outp = (dx1 * dy2 - dx2 * dy1);
      if(outp <= 0.0) ans = false;
    }
    puts(ans?"YES":"NO");
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
//define
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define ADD(a, b) a = (a + b) % mod
#define SUB(a, b) a = (a+mod-b)%mod
#define MUL(a, b) a = (a * b) % mod
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
#define fi first
#define se second
// 許容する誤差ε
#define EPS (1e-10)
// 2つのスカラーが等しいかどうか
#define EQ(a,b) (abs((a)-(b)) < EPS)
// 2つのベクトルが等しいかどうか
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
//template
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p){
  os << "(" << p.first << "," << p.second << ")";return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v){
  for (auto it = v.begin();it != v.end();++it){
    if(it != v.begin())os << " ";os << *it;
      }return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const map<T, U> &mp){
  for(auto x: mp)os << "(" << x.first << "," << x.second << ")" << endl;
  return os;
}
template<typename T, int SIZE>
int array_length(const T (&)[SIZE]){return SIZE;}
template<typename T, int N>
void PRINTF(const T (&a)[N], int s = N, int t = -1, bool f = true){
	if(t == -1){rep(i,s){if(i)cout << " ";cout << a[i];}}
	else repi(i,s,t){if(i!=s)cout << " ";cout << a[i];}
	if(f)cout << "\n";
}
template<typename T, int N1, int N2>
void PRINTF(const T (&a)[N1][N2], int h = N1, int w = N2){
	rep(i,h){rep(j,w){cout << a[i][j] << " \n"[j==w-1];}}
}
//typedef
typedef complex<double> Point;
typedef pair<int,int> P;
typedef pair<int, P> PP;
typedef pair<P, int> Pi;
typedef vector<int> vi;
typedef deque<int> dq;
const int inf = 1e9+7;
const int INF = 1e18+7;


double dot(Point a, Point b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(Point a, Point b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}
bool cmp_x(const Point &p1, const Point &p2){
  if(p1.real() == p2.real())return p1.imag() < p2.imag();
  return p1.real() < p2.real();
}
class GrahamScan{
public:
  vector<Point> ps;
  int n;
  void init(int N){
    ps.clear();
    n = N;
  }
  void add_point(int x, int y){
    ps.push_back(Point(x, y));
  }
  vector<Point> graham_scan(){  //作った凸のvectorを返す
    sort(ps.begin(), ps.end(), cmp_x);
    int k = 0;
    vector<Point> qs(2*n);
    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;
  }
};


signed main(){
  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]) != EOF){
    GrahamScan G;G.init(4);
    rep(i,4)G.add_point(X[i], Y[i]);
    vector<Point> vec = G.graham_scan();
    if(vec.size() == 4)printf("YES\n");
    else printf("NO\n");
  }
	return 0;
}