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 <fstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <list>
#include <utility>
#include <cmath>
#include <sstream>
#define F first
#define S second
#define FOR(i,n) for(int i=0;i<(int)n;i++)
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define FORI(i,k,n) for(int i=k;i<(int)n;i++)
#define repp(i,k,n) for(int i=k;i<(int)n;i++)
using namespace std;
typedef pair<double, double> pdd;
bool deb(int x) {cout << x << ":ok" << endl; return true;}
bool deb() {cout << "ok" << endl; return true;}

double wid(pdd a, pdd b) {
	return sqrt((a.first - b.first) * (a.first - b.first) + (a.second - b.second) * (a.second - b.second));
}

double yoge(pdd a, pdd b, pdd c) {
	double A, B, C;
	A = wid(a, b); B = wid(b, c); C = wid(c, a);
	return acos((B*B+C*C-A*A)/(2*B*C));
}

int main() {
	pdd p[4];
	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p[0].first,&p[0].second,&p[1].first,&p[1].second,&p[2].first,&p[2].second,&p[3].first,&p[3].second)!=EOF) {
		bool ok = true;
		if(yoge(p[0],p[1],p[2])/3.1415*180>90)ok=false;
		if(yoge(p[1],p[2],p[3])/3.1415*180>90)ok=false;
		if(yoge(p[2],p[3],p[0])/3.1415*180>90)ok=false;
		if(yoge(p[3],p[0],p[1])/3.1415*180>90)ok=false;

		if(ok)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}

}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

using namespace std;

int main () {
    double x1,x2,x3,x4,y1,y2,y3,y4;
    
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&x1,&y1,&x3,&y3,&x2,&y2,&x4,&y4)!=EOF){
        double tc=(x1-x2)*(y3-y1)+(y1-y2)*(x1-x3);
        double td=(x1-x2)*(y4-y1)+(y1-y2)*(x1-x4);
        
        double ta=(x3-x4)*(y1-y3)+(y3-y4)*(x3-x1);
        double tb=(x3-x4)*(y2-y3)+(y3-y4)*(x3-x2);
        
        if(tc*td<0&&ta*tb<0){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        
    }
    return 0;
}

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

using namespace std;

struct point {
	double x, y;
}p[5];

double dis(point A, point B) {
	return sqrt((A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y));
}

double crossProd(point A, point B, point C) {
	return (B.x - A.x) * (C.y - A.y) - (B.y - A.y) * (C.x - A.x);
}

int cmp(const void *a, const void *b) {
	point *c = (point *)a;
	point *d = (point *)b;
	double k = crossProd(p[0], *c, *d);
	if (k < 0 || !k && dis(p[0], *c) > dis(p[0], *d)) return 1;
	return -1;
}

bool solve() {
	double x = p[0].x;
	double y = p[0].y;
	int mi = 0;
	for (int i=1; i<4; ++i) {
		if (p[i].y < y || p[i].y == y && p[i].x < x) {
			x = p[i].x;
			y = p[i].y;
			mi = i;
		}
	}
	point tmp = p[0];
	p[0] = p[mi];
	p[mi] = tmp;
	qsort(p, 4, sizeof(point), cmp);
	if (crossProd(p[0], p[1], p[2]) > 0 &&
		crossProd(p[1], p[2], p[3]) > 0 &&
		crossProd(p[2], p[3], p[0]) > 0) return true;
	return false;
}

int main() {
	while (scanf("%lf,%lf", &p[0].x, &p[0].y) != EOF) {
		for (int i=1; i<4; ++i) scanf (",%lf,%lf", &p[i].x, &p[i].y);
		bool yes = solve();
		if (yes) printf ("YES\n");
		else printf ("NO\n");
	}
	return 0;
}

C++: 
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

//???????????????????????????????§?(cos??)????±???????
double arg(double vx,double vy,double ux,double uy)
{
  double v=sqrt(vx*vx+vy*vy);//????????????v?????§??????
  double u=sqrt(ux*ux+uy*uy);//????????????u?????§??????
  double product=vx*ux+vy*uy;//????????????u??¨????????????v?????????
  /*
  printf("\nv=%f\nu=%f\n",u,v);
  printf("product=%f\n",product);
  printf("cos=%f\n",product/v/u);
  */
  return acos(product/v/u);

}


int main()
{
  double xa,ya,xb,yb,xc,yc,xd,yd;
  double large,small;

  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
	      &xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){


    large=arg(xa-xd,ya-yd,xc-xd,yc-yd);//DC,DA
    small=arg(xb-xd,yb-yd,xc-xd,yc-yd);//DC,DB
    // printf("A\n%f\n%f\n",large,small);
    if(large<small){      //?§?A?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xb-xa,yb-ya,xd-xa,yd-ya);//AD,AB
    small=arg(xc-xa,yc-ya,xd-xa,yd-ya);//AD,AC
    // printf("B\n%f\n%f\n",large,small);
    if(large<small){      //?§?B?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xc-xb,yc-yb,xa-xb,ya-yb);//BA,BC
    small=arg(xd-xb,yd-yb,xa-xb,ya-yb);//BA,BD
    // printf("C\n%f\n%f\n",large,small);
    if(large<small){      //?§?C?????????
      cout<<"NO"<<endl;
      continue;
    }


    large=arg(xd-xc,yd-yc,xb-xc,yb-yc);//CB,CD
    small=arg(xa-xc,ya-yc,xb-xc,yb-yc);//CB,CA
    //  printf("D\n%f\n%f\n",large,small);
    if(large<small){      //?§?D?????????  
      cout<<"NO"<<endl;
      continue;
    }

    cout<<"YES"<<endl;

  }
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
typedef pair<double, double> Pd;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve
double cross(const Pd &o, const Pd &a, const Pd &b){
  return (a.first - o.first) * (b.second - o.second) - (a.second - o.second) * (b.first - o.first);
}

vector<Pd> convex_hull(vector<Pd> vec){
  int n = vec.size(), k = 0;
  if(n < 3)return vec;

  vector<Pd> ch(2 * n);
  sort(vec.begin(), vec.end());

  // lower
  for(int i = 0; i < n; i++){
    while(k >= 2 && cross(ch[k-2], ch[k-1], vec[i]) <= 0.)k--;
    ch[k++] = vec[i];
  }

  // upper
  for(int i = n - 1, t = k + 1; i > 0; --i){
    while(k >= t && cross(ch[k-2], ch[k-1], vec[i-1]) <= 0.)k--;
    ch[k++] = vec[i-1];
  }

  ch.resize(k - 1);
  return ch;

}

int main(int argc, char const* argv[])
{
  double x[8];
  string s;
  while(cin >> s){
    s += ",";
    string tmp = "";
    int at = 0;
    rep(i, s.size()){
      if(s[i] == ','){
        x[at] = stod(tmp);
        at++;
        tmp = "";
      }else{
        tmp += s[i];
      }
    }
    vector<Pd> vec;
    rep(i, 4){
      vec.pb(mk(x[2 * i], x[2 * i + 1]));
    }
    vector<Pd> ch = convex_hull(vec);
    if(ch.size() == 4)cout << "YES" << endl;
    else cout << "NO" << endl;
  }
	return 0;
}