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<cstdio>
#include<algorithm>
#include<climits>
#include<queue>
#include<map>
#include<set>
#include<vector>
#include<list>
#include<stack>
#include<cstring>
#include<string>
#include<cmath>
using namespace std;

struct Point{
	double x,y;
	Point(){}
	Point(double _x,double _y){
		x=_x; y=_y;
	}
};

struct Line{
	double x[2],y[2];
	Line(){}
	Line(Point p,Point q){
		x[0]=p.x; x[1]=q.x;
		y[0]=p.y; y[1]=q.y;
	}
};

void RevXY(Point &p){
	swap(p.x,p.y);
}

void RevXY(Line &l){
	for(int i=0;i<2;i++) swap(l.x[i],l.y[i]);
}

bool Is_SameSide(Line l,Point p,Point q){
	//printf("%lf,%lf - %lf,%lf\np(%lf,%lf),q(%lf,%lf)\n",l.x[0],l.y[0],l.x[1],l.y[1],p.x,p.y,q.x,q.y);
	if(l.x[1]==l.x[0]){
		RevXY(l); RevXY(p); RevXY(q);
	}
	double a,b;
	a = (l.y[1]-l.y[0])/(l.x[1]-l.x[0]);
	b = l.y[0]-a*l.x[0];
	//printf("%lf,%lf - %lf,%lf : y = %lfx+(%lf)\np(%lf,%lf),q(%lf,%lf)\n",l.x[0],l.y[0],l.x[1],l.y[1],a,b,p.x,p.y,q.x,q.y);
	if((p.y-(a*p.x+b))*(q.y-(a*q.x+b))>0) return true;
	else return false;
}

int main(){
	Point S[4];
	while(scanf("%lf,%lf",&S[0].x,&S[0].y)!=EOF){
		Point sum = Point(S[0].x,S[0].y);
		for(int i=1;i<4;i++){
			scanf(",%lf,%lf",&S[i].x,&S[i].y);
			sum.x += S[i].x; sum.y += S[i].y;
		}
		bool ans=true;
		for(int i=0;i<4;i++){
			if(Is_SameSide(Line(S[i],S[(i+2)%4]),S[(i+1)%4],Point((sum.x-S[(i+1)%4].x)/3,(sum.y-S[(i+1)%4].y)/3))==true){
				ans = false;
			}
		}
		if(ans) puts("YES");
		else puts("NO");
	}
}

C++: #include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <sstream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define bitcount(b) __builtin_popcount(b)

struct P{double x,y;};


double euc(P a,P b){
	a.x-=b.x;
	a.y-=b.y;
	return sqrt( a.x * a.x + a.y * a.y );
}

double tri(P a,P b,P c){	
	a.x -= c.x, a.y -= c.y;
	b.x -= c.x, b.y -= c.y;
	c.x -= c.x; c.y -= c.y;
	
	return fabs(b.x * a.y - a.x * b.y) / 2.0;
}

int main(){
	vector<P> d(4);
	string line;
	while( getline(cin,line) ){
		while(~line.find(","))line[line.find(",")] = ' ';
		stringstream ss(line);
		rep(i,4){
			if( ss >> d[i].x >> d[i].y );
			else return 0;
		}
		double sum = 0;
		
		sum = tri(d[0],d[1],d[2]) + tri(d[0],d[2],d[3]);
		
		bool flag = true;
		
		rep(i,1<<4){
		
			if(bitcount(i) != 3)continue;
			
			vector<P> t;
			
			rep(j,4){
				if( i & (1<<j) ){
					t.push_back(d[j]);	
				}
			}
			if( tri(t[0],t[1],t[2]) > sum ){
				flag = false;
			}
		}
		cout << (flag?"YES":"NO") << endl;
	}
}

C++: #include <cstdio>

using namespace std;

int main()
{
	double xs[4],ys[4],a,t;
	int p,np,ans;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xs[0],&ys[0],&xs[1],&ys[1],&xs[2],&ys[2],&xs[3],&ys[3])!=EOF){
		ans=a=t=0;
		for(int i=0;i<4;i++){
			p=(i+3)%4;
			np=(i+1)%4;
			t=(xs[i]-xs[p])*(ys[np]-ys[i])-(ys[i]-ys[p])*(xs[np]-xs[i]);
			if(a*t<0){
				ans=1;
				break;
			}
			else{
				a=t;
			}
		}
		if(ans==0){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

struct Vector {
        double x;
        double y;
};

bool is_c_inner(double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd) {
    Vector ab = Vector{xb - xa, yb - ya};
    Vector bc = Vector{xc - xb, yc - yb};

    Vector bd = Vector{xd - xb, yd - yb};
    Vector dc = Vector{xc - xd, yc - yd};

    Vector da = Vector{xa - xd, ya - yd};
    Vector ac = Vector{xc - xa, yc - ya};

    double cross_product_1 = ab.x * bc.y - ab.y * bc.x;
    double cross_product_2 = bd.x * dc.y - bd.y * dc.x;
    double cross_product_3 = da.x * ac.y - da.y * ac.x;

    return (cross_product_1 >  0 && cross_product_2 >  0 && cross_product_3 >  0) ||
            (cross_product_1 <  0 || cross_product_2 <  0 && cross_product_3 <  0);
}

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

    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd) != EOF) {
        if(is_c_inner( xa, ya, xb, yb, xc, yc, xd, yd)
                || is_c_inner(xb, yb, xc, yc, xd, yd, xa, ya)
                || is_c_inner(xc, yc, xd, yd, xa, ya, xb, yb)
                || is_c_inner( xd, yd, xa, ya, xb, yb, xc, yc)
                ) {
            result = "NO"; // convex
        } else {
            result = "YES"; //no convex
        }
        cout << result << endl;
    }
    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*vy+ux*uy;//????????????u??¨????????????v?????????
  /*
  printf("\nv=%f\nu=%f\n",u,v);
  printf("product=%f\n",product);
  printf("cos=%f\n\n",product/v/u);
  */
  return abs(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
    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
    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
    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
    if(large>small){      //?§?D?????????  
      cout<<"NO"<<endl;
      continue;
    }

    cout<<"YES"<<endl;

  }
}