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 <sstream>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <limits>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <complex>

using namespace std;

//define
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF (INT_MAX/3)
#define PI (2*acos(0.0))
#define EPS (1e-8)

typedef long long ll;
typedef unsigned long long ull;

int main(){
  ios_base::sync_with_stdio(0);
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double c1, c2, c3, c4;
  pair<double, double> v1, v2, v3, v4;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF){
    v1 = pair<double, double>(xb - xa, yb - ya);
    v2 = pair<double, double>(xc - xb, yc - yb);
    v3 = pair<double, double>(xd - xc, yd - yc);
    v4 = pair<double, double>(xa - xd, ya - yd);
    c1 = v1.first * v2.second - v1.second * v2.first;
    c2 = v2.first * v3.second - v2.second * v3.first;
    c3 = v3.first * v4.second - v3.second * v4.first;
    c4 = v4.first * v1.second - v4.second * v1.first;
    if(c1 * c2 * c3 * c4 < 0) cout << "NO" << endl;
    else cout << "YES" << endl;
  }
  return 0;
}

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

using namespace std;

double ang(double x1, double y1, double x2, double y2) {
    return acos((x1 * x2 + y1 * y2) / (sqrt(x1 * x1 + y1 * y1) * sqrt(x2 * x2 + y2 * y2)));
}

int main (void) {
    while (true) {
        double x1, x2, x3, x4, y1, y2, y3, y4;
        if (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) == EOF) break;
        double a = 0;
        a += ang(x2 - x1, y2 - y1, x2 - x3, y2 - y3);
        a += ang(x3 - x2, y3 - y2, x3 - x4, y3 - y4);
        a += ang(x4 - x3, y4 - y3, x4 - x1, y4 - y1);
        a += ang(x1 - x4, y1 - y4, x1 - x2, y1 - y2);
        if (abs(M_PI * 2 - a) < 0.01) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

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

double calculate_surface_area( double a, double b, double c )
{
    double co, si;
    co = ( a * a - b * b - c * c ) / ( -2 * b * c );
    si = sqrt( 1 - co * co );
    return 0.5 * b * c * si;
}

int main()
{
    double xa, ya, xb, yb, xc, yc, xd, yd;
    char p;
    while( cin >> xa >> p >> ya >> p >> xb >> p >> yb >> p >> xc >> p >> yc >> p >> xd >> p >> yd )
    {
        double ab = length( xa, ya, xb, yb ), bc = length( xb, yb, xc, yc ), ca = length( xc, yc, xa, ya );
        double ad = length( xa, ya, xd, yd ), bd = length( xb, yb, xd, yd ), cd = length( xc, yc, xd, yd );

        double square = calculate_surface_area( bc, ca, ab ) + calculate_surface_area( ca, ad, cd);
        double tabc = calculate_surface_area( bc, ca, ab );
        double tbcd = calculate_surface_area( cd, bd, bc );
        double tcda = calculate_surface_area( cd, ad, ca );
        double tdab = calculate_surface_area( bd, ad, ab );

        //（正解）四角形abcdにおいて、abc+adc = abd + bdcであれば、窪みが無いといえる。
        if( fabs( tabc + tcda - tdab - tbcd ) < 0.0000001 )
            cout << "YES" << endl;
        else
            cout << "NO" << endl;

        //（誤り）四角形の面積が、三点を選んでできたどんな三角形の面積より大きいならば、凹みが無い。
        //三角形abcが窪んでいるところで、四角形の面積を表さない時、これは成立しないので誤り。
    }       
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 30;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };
  
bool collision_detection( double x1, double y1, double x2, double y2, double x3, double y3, double xp, double yp ) {
    x2 -= x1;
    x3 -= x1;
    xp -= x1;
    y2 -= y1;
    y3 -= y1;
    yp -= y1;
    double t_size = fabs( ( x2 * y3 - y2 * x3 ) / 2 );
    t_size -= fabs( ( x2 * yp -  y2 * xp ) / 2 );
    t_size -= fabs( ( x3 * yp -  y3 * xp ) / 2 );
    x2 -= xp;
    x3 -= xp;
    y2 -= yp;
    y3 -= yp;
    yp = xp = 0;
    t_size -= fabs( ( x2 * y3 - y2 * x3 ) / 2 );
    return fabs( t_size ) < 1e-10;
}
  
int 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 ] ) ) {
        bool print_yes = true;
        for ( int i = 0; i < 4; i++ ) {
            if ( collision_detection( x[ ( i + 1 ) % 4 ], y[ ( i + 1 ) % 4 ], x[ ( i + 2 ) % 4 ], y[ ( i + 2 ) % 4 ], x[ ( i + 3 ) % 4 ], y[ ( i + 3 ) % 4 ], x[ i ], y[ i ] ) ) {
                print_yes = false;
                break;
            }
        }
        printf( "%s\n", print_yes ? "YES" : "NO" );
    }
    return 0;
}