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 "math.h"
#include "stdio.h"
#include <algorithm>
#include <string>
#include <map>
#include <iostream>

using namespace std;

/** Problem0035 : It is Convex? **/
double calcS(double x1, double y1, double x2, double y2, double x3, double y3)
{
	double S, s, ab, bc, ca;
	ab = sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	bc = sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
	ca = sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
	s = 0.5*(ab+bc+ca);
	S=sqrt(s*(s-ab)*(s-bc)*(s-ca));
	return S;
}

int main()
{
	double x1, y1, x2, y2, x3, y3, x4, y4;
	char c;
	
	while (1) {
		cin >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> x3 >> c >> y3 >> c >> x4 >> c >> y4;
		if (cin.eof()) break;
		
		if (fabs((calcS(x1,y1,x2,y2,x3,y3)+calcS(x1,y1,x4,y4,x3,y3)) - (calcS(x2,y2,x3,y3,x4,y4)+calcS(x2,y2,x1,y1,x4,y4))) <= 0.01)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <complex>
#include <cmath>
using namespace std;

typedef complex <double> P;
#define X real()
#define Y imag()

double func(P p1, P p2, P p3, P p4){
	return  ( (p1.X-p2.X)*(p3.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p3.X)) * ((p1.X-p2.X)*(p4.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p4.X));
}

int main(void)
{
	double x1, x2, x3, x4, y1, y2, y3, y4;
	char a;
	
	while (cin>>x1>>a>>y1>>a>>x2>>a>>y2>>a>>x3>>a>>y3>>a>>x4>>a>>y4){
		P a(x1, y1);
		P b(x2, y2);
		P c(x3, y3);
		P d(x4, y4);
		
		if (0.0 < func(a, c, b, d) || 0.0 < func(b, d, a, c)) cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	
	return 0;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

struct Point : public complex<double>
{
public:
  Point() { this->real(0);  this->imag(0); }
  Point(const double& x, const double& y) { this->real(x);  this->imag(y); }
  Point(const complex<double> w)  { this->real(w.real());  this->imag(w.imag()); }
  inline double dot(Point p){ return (conj(*this) * p).real(); }  // ??????
  inline double det(Point p){ return (conj(*this) * p).imag(); }  // ??????
};

namespace std
{
  bool operator < (const Point& a, const Point& b)
  {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}

int ccw(Point a, Point b, Point c)
{
  b -= a;
  c -= a;
  if(b.det(c) > 0.0)    return  1;
  if(b.det(c) < 0.0)    return -1;
  if(b.dot(c) < 0.0)    return  2;
  if(norm(b) < norm(c)) return -2;
  return 0;
}

typedef vector<Point> Polygon;


#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
bool isConvex(const Polygon &P) {
  for (int i = 0; i < P.size(); ++i)
    if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
  return true;
}

// O(nlogn)
vector<Point> AndrewMonotoneChain(vector<Point> ps)
{
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<Point> ch(2*n);
  for(int i=0; i<n; ch[k++]=ps[i++]) // lower-hull
    while(k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  for(int i=n-2, t=k+1; i>= 0; ch[k++]=ps[i--]) // upper-hull
    while(k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  ch.resize(k-1);
  return ch;
}


template<typename T> ostream& operator <<(ostream& r, const vector<T> t){vrep(v,t)r<<*v<<(v+1==t.end()?"":" ");return r;}
template<typename T> ostream& operator <<(ostream& r, const pair<vector<T>, int> p){int n=p.second;minup(n,p.first.size());rep(i,n-1)r<<p.first[i]<<' ';r<<p.first[n-1];return r;}
template<typename T> ostream& operator <<(ostream& r, const pair<T*, int> p){int n=p.second-1;rep(i,n)r<<p.first[i]<<' ';return r<<p.first[n];}
template<typename T, size_t S> ostream& operator <<(ostream& r, const T (&a)[S]){rep(i,S-1)r<<a[i]<<' ';return r<<a[S-1];}


double x, y;
bool ok = true;

int main()
{
  while(~scanf("%lf,%lf", &x, &y)){
    Polygon P;
    P.pb(Point(x, y));
    rep(i, 3){
      scanf(",%lf,%lf", &x, &y);
      P.pb(Point(x, y));
    }

    //cerr << P << endl;
    //    puts(isConvex(P) ? "NO" : "YES");
    puts(AndrewMonotoneChain(P) == P ? "YES" : "NO");
  }

  return 0;
}

C++: #include<iostream>
#include<string>
#include<sstream>
#include<stdlib.h>
#include<math.h>
#include<vector>
#define EPS (1e-10)
using namespace std;
double s2d(string str){
  stringstream ss(str);
  double x;ss>>x;
  return x;
}
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);}
};
typedef Point Vector;
typedef vector<Point> Polygon;
double norm(Vector a){
  return a.x*a.x+a.y*a.y;
}
double abs(Vector a){
  return sqrt(norm(a));
}
double dot(Vector a,Vector b){
  return a.x*b.x+a.y*b.y;
}
double cross(Vector a,Vector b){
  return a.x*b.y-a.y*b.x;
}
int contains(Polygon g,Point p){
  int n=g.size();
  bool x=false;
  for(int i=0;i<n;i++){
    Point a=g[i]-p,b=g[(i+1)%n]-p;
    if(fabs(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 main(){
  string str;
  while(cin >> str){
    Point p[4];
    int i,j,k;
    for(i=0;i<str.size();i++)if(str[i]==',') str[i]=' ';
    stringstream ss(str);
    for(i=0;i<4;i++){
      ss>>str;p[i].x=s2d(str);
      ss>>str;p[i].y=s2d(str);
      //cout << p[i].x <<":" << p[i].y << endl;
    }
    bool f=false;
    for(i=0;i<4;i++){
      Polygon g;
      g.clear();
      for(j=0;j<4;j++){
	if(i!=j) g.push_back(p[j]);
      }
      //cout << contains(g,p[i]) << endl;
      if(contains(g,p[i])==2) f=true;
    }
    if(!f) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}