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")
		}
	}
}

Python: # Aizu Problem 0035: Is it Convex?
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def distance(p1, p2):
    return math.sqrt((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)

def is_to_the_left(p1, p2, p3):
    # determine whether point p3 is to the left from the line from p1 to p2
    position = (p2[0] - p1[0]) * (p3[1] - p1[1]) - (p2[1] - p1[1]) * (p3[0] - p1[0])
    return position < 0


def jarvis(points):
    # determine convex hull by Jarvis' algorithm:
    max_y = max([p[1] for p in points])
    pointOnHull = [p for p in points if p[1] == max_y][0]
    convex_hull = [pointOnHull]
    while len(convex_hull) == 1 or convex_hull[-1] != convex_hull[0]:
        p = convex_hull[-1]
        endpoint = points[0]
        for j in range(len(points)):
            if endpoint == pointOnHull or is_to_the_left(p, endpoint, points[j]):
                endpoint = points[j]
        pointOnHull = endpoint
        convex_hull.append(pointOnHull)
    return convex_hull[::-1]
    

def convex_hull(points):
    hull = jarvis(points)
    length = 0
    line2 = ""
    for i in range(len(hull) - 1):
        p1, p2 = hull[i], hull[i+1]
        line2 += "(" + str(p1[0]) + "," + str(p1[1]) + ") "
    line2 += "(" + str(hull[-1][0]) + "," + str(hull[-1][1]) + ")"
    print(line2)
    

while True:
    try:
        x1, y1, x2, y2, x3, y3, x4, y4 = [float(_) for _ in input().split(',')]
    except EOFError:
        break
    print("YES" if len(jarvis([[x1, y1], [x2, y2], [x3, y3], [x4, y4]])) == 5 else "NO")

Python: def distance(ax,ay,bx,by):
    return (ax-bx)**2+(ay-by)**2

def yogen(plist, st):
    a = distance(plist[st], plist[st+1], plist[st+2], plist[st+3])
    b = distance(plist[st+2], plist[st+3], plist[st+4], plist[st+5])
    c = distance(plist[st+4], plist[st+5], plist[st], plist[st+1])
    return a-b+c >= 0

while True:
    try:
        points = list(map(float, input().split(",")))
        points.extend(points)
        if yogen(points, 0) and yogen(points, 2) and yogen(points, 4) and yogen(points, 6): print("YES")
        else: print("NO")

    except EOFError: break

Python: def f(x1,y1,x2,y2,x3,y3,x4,y4):
    p = (x3 - x4) * (y1 - y3) + (y3 - y4) * (x3 - x1)
    q = (x3 - x4) * (y2 - y3) + (y3 - y4) * (x3 - x2)
    r = (x1 - x2) * (y3 - y1) + (y1 - y2) * (x1 - x3)
    s = (x1 - x2) * (y4 - y1) + (y1 - y2) * (x1 - x4)
    return p * q < 0 and r * s < 0

while True:
    try:
        x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split(','))
    except EOFError:
        break
    if f(x1,y1,x3,y3,x2,y2,x4,y4):
        print('YES')
    else:
        print('NO')

Python: import sys
for e in sys.stdin:
 e=list(map(float,e.split(',')));f=1
 for i in range(0,8,2):
  f*=(e[i]-e[(2+i)%8])*(e[(4+i)%8]-e[(2+i)%8])+(e[1+i]-e[(3+i)%8])*(e[(5+i)%8]-e[(3+i)%8])
 print(['YES','NO'][f<0])

Python: import sys

def solve():
    for line in sys.stdin:
        xa,ya,xb,yb,xc,yc,xd,yd = map(float, line.split(','))
        
        def fac(x, y):
            if xa == xc:
                return x - xa
            else:
                return ((ya-yc)/(xa-xc))*(x-xa) - y + ya
        
        def fbd(x, y):
            if xb == xd:
                return x - xb
            else:
                return ((yb-yd)/(xb-xd))*(x-xb) - y + yb
        
        if fac(xb, yb) * fac(xd, yd) > 0:
            print('NO')
        elif fbd(xa, ya) * fbd(xc, yc) > 0:
            print('NO')
        else:
            print('YES')

if __name__ == "__main__":
    solve()

Python: import sys
for e in sys.stdin:
 e=list(map(float,e.split(',')));n=0
 for i in range(0,8,2):
  s=(e[i]-e[(2+i)%8])*(e[(4+i)%8]-e[(2+i)%8])+(e[1+i]-e[(3+i)%8])*(e[(5+i)%8]-e[(3+i)%8])
  if s>0:n+=1
 print(['YES','NO'][n%4>0])

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cfloat>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define EACH( v, c ) for ( auto &v : c )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

typedef pair< double, double > PDD;

double cross( PDD p1, PDD p2 )
{
	return p1.fst * p2.snd - p1.snd * p2.fst;
}

PDD operator - ( PDD p1, PDD p2 )
{
	return MP( p1.fst - p2.fst, p1.snd - p2.snd );
}

int main()
{
	cin.tie( 0 );
	ios::sync_with_stdio( false );

	string line;

	while ( cin >> line )
	{
		REP( i, 0, line.size() )
		{
			if ( line[i] == ',' )
			{
				line[i] = ' ';
			}
		}

		vector< PDD > ps( 4 );

		ISS iss( line );

		REP( i, 0, 4 )
		{
			iss >> ps[i].fst >> ps[i].snd;
		}

		ps.insert( ps.end(), ps.begin(), ps.begin() + 2 );

		int res = 0;

		REP( i, 0, 4 )
		{
			res += cross( ps[i] - ps[ i + 1 ], ps[ i + 1 ] - ps[ i + 2 ] ) < 0 ? -1 : 1;
		}

		if ( abs( res ) == 4 )
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

vector<pair<int,int> >vec;

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])!=EOF){
        int suc=1;
        for(int i=0;i<4;i++){
            if((x[i]*y[(i+1)%4]-y[i]*x[(i+1)%4])*(x[(i+1)%4]*y[(i+2)%4]-y[(i+1)%4]*x[(i+2)%4])<=0){
           //     cout<<(x[i]*y[(i+1)%4]-y[i]*x[(i+1)%4])<<"     "<<(x[(i+1)%4]*y[(i+2)%4]-y[(i+1)%4]*x[(i+2)%4])<<endl;
                suc=0;
                break;
            }
          //  cout<<(x[i]*y[(i+1)%4])<<"    "<<(y[i]*x[(i+1)%4])<<"     "<<(x[(i+1)%4]*y[(i+2)%4])<<"    "<<(y[(i+1)%4]*x[(i+2)%4])<<endl;
        }
        if(suc)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}