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;
const double EPS = 1e-6;
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;
	C = wid(a, b); A = wid(b, c); B = 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[3],p[1])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[1],p[0],p[2])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[2],p[1],p[3])/3.1415926535*180-90>EPS)ok=false;
		if(yoge(p[3],p[2],p[0])/3.1415926535*180-90>EPS)ok=false;

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

}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;
double x[4], y[4];
double ab, bc, cd, da, ac, bd;

double len(double x1, double y1, double x2, double y2)
{
    return sqrt(pow(x1-x2, 2.0) + pow(y1-y2, 2.0));
}

// Heron's Formula
double square(double a, double b, double c)
{
    double s = (a + b + c) / 2.0;
    return sqrt(s * (s-a) * (s-b) * (s-c));
}


int main(void)
{
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)) {
        ab = len(x[0],y[0],x[1],y[1]);
        bc = len(x[1],y[1],x[2],y[2]);
        cd = len(x[2],y[2],x[3],y[3]);
        da = len(x[3],y[3],x[1],y[1]);
        ac = len(x[0],y[0],x[2],y[2]);
        bd = len(x[4],y[4],x[1],y[1]);
        double s1,s2,s3,s4;
        s1 = square(ab, bd, da);
        s2 = square(cd, bd, bc);
        s3 = square(ac, cd, da);
        s4 = square(ab, bc, ac);
        double comp1;
        comp1 = (s1+s2) - (s3+s4);

        if(fabs(comp1) <= 0.1)
            puts("YES");
        else
            puts("NO");
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

struct point{
	double x,y;
};

double op(point a,point b){
	return a.x*b.y-a.y*b.x;
}

int main(){
	point p[4];
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&p[0].x,&p[0].y,&p[1].x,&p[1].y,&p[2].x,&p[2].y,&p[3].x,&p[3].y)!=EOF){
		point vec[4];
		rep(i,4){
			vec[i].x=p[(i+1)%4].x-p[i].x;
			vec[i].y=p[(i+1)%4].y-p[i].y;
		}
		int check=0;
		rep(i,4){
			if(op(vec[i],vec[i+1])>0){
				check++;
			}
		}
		if(check==4 || check==0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <map>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;

int main()
{
	double x[4], y[4];
	while(1){
		rep(i, 4){
			if(scanf("%lf,%lf,", &x[i], &y[i]) == EOF)
				return 0;
		}

		bool ok = true;
		bool turn = true;
		rep(i, 4){
			bool b = (x[(i+1)%4]-x[i])*(y[(i+2)%4]-y[i])-(y[(i+1)%4]-y[i])*(x[(i+2)%4]-x[i]) < 0.0;
			if(!i) turn = b;
			else if(turn^b){
				ok = false;
				break;
			}
		}
		puts(ok ? "YES" : "NO");
	}
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
#include<array>

using namespace std;

int main()
{
  array<double, 4> x;
  array<double, 4> y;
  char c;

  while( cin >> x[0] >> c >> y[0] >> c >> x[1] >> c >> y[1] >> c >> x[2] >> c >> y[2] >> c >> x[3] >> c >> y[3] )
    {
      array<double, 2> vx;
      array<double, 2> vy;
      bool convex = true;

      for ( int i = 0; i < 4; ++i )
        {
          vx[0] = x[(i+2)%4] - x[(i+1)%4];
          vy[0] = y[(i+2)%4] - y[(i+1)%4];
          vx[1] = x[i%4] - x[(i+1)%4];
          vy[1] = y[i%4] - y[(i+1)%4];

          if ( ( vx[0] * vy[1] - vx[1] * vy[0] )  < 0 )
            {
              convex = false;
              break;
            }
        }
      
      if ( convex )
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  
  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<bitset>
#include<cmath>
#include<cstdio>
using namespace std;
double dis(double xa,double ya,double xb,double yb){
    return sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
}
double S(double a,double b,double c){
    double s=(a+b+c)/2;
    return sqrt(s*(s-a)*(s-b)*(s-c));
}
bool in(double xa,double ya,double xb,
        double yb,double xc,double yc,double xp,double yp){
    double AB,BC,CA,AP,BP,CP;
    AB=dis(xa,ya,xb,yb);
    BC=dis(xb,yb,xc,yc);
    CA=dis(xc,yc,xa,ya);
    AP=dis(xa,ya,xp,yp);
    BP=dis(xb,yb,xp,yp);
    CP=dis(xc,yc,xp,yp);
    double ABC,ABP,BCP,CAP;
    ABC=S(AB,BC,CA);ABP=S(AB,AP,BP);
    BCP=S(BC,BP,CP);CAP=S(CA,CP,AP);

    double dif=ABC-ABP-BCP-CAP;
    if(dif<=0.0001&&dif>=-0.0001)return true;
    else return false;
}
int main(){
    double x[4],y[4];
    while(scanf("%lf,%lf",&x[0],&y[0])!=EOF){
        for(int i=1;i<4;i++)scanf(",%lf,%lf",&x[i],&y[i]);
        bool F=false;
        for(int i=0;i<4;i++){
            int a=(i+1)%4,b=(i+2)%4,c=(i+3)%4;
            F|=in(x[i],y[i],x[a],y[a],x[b],y[b],x[c],y[c]);
        }

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

C++: #include <bits/stdc++.h>
#define rep(i, n) for(int i=0;i<(int)(n);++i)
#define rep1(i, n) for(int i=1;i<=(int)(n);++i)
#define irep(i, a, n) for(int i=a;i<(int)(n);++i)
#define rrep(i, n) for(int i=(int)(n)-1;i>=0;--i)
#define rrep1(i, n) for(int i=(int)(n);i>=1;--i)
#define allrep(V, v) for(auto&& V:v)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const int INF=1<<29;
const double EPS=1e-9;
using namespace std;


int main (void)
{
  double xa,ya,xb,yb,xc,yc,xd,yd;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){
    double area1,area2;
    area1=abs((xa-xb)*(yc-yb)-(ya-yb)*(xc-xb))+abs((xa-xd)*(yc-yd)-(ya-yd)*(xc-xd));
    area2=abs((xb-xa)*(yd-ya)-(yb-ya)*(xd-xa))+abs((xb-xc)*(yd-yc)-(yb-yc)*(xd-xc));

    cout << (area1==area2 ? "YES" : "NO") << endl;
  }
  return 0;
}