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: import sys
def sign(x):
    if x>0: s=1
    elif x==0: s=0
    else: s=-1
    return s

def f(p1,p2,p3):
    s = sign((p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0]))
    return s

for s in sys.stdin:
    D =map(float, s.split(","))
    p1=D[0:2]; p2=D[2:4]; p3=D[4:6]; p4=D[6:8]
    x = f(p1,p3,p2) != f(p1,p3,p4) and f(p2,p4,p1) != f(p2,p4,p3)
    print ["NO","YES"][x]

Python: # AOJ 00035: Is it Convex?
# Python3 2018.6.17 bal4u

EPS = 0.0001

# a, b, はラインの同一側にあるか。　-1, 0, 1
def atSameSide(a, b, line):
	sa = (line[1].real-line[0].real)*(a.imag-line[0].imag) \
		 + (line[1].imag-line[0].imag)*(line[0].real-a.real);
	sb = (line[1].real-line[0].real)*(b.imag-line[0].imag) \
		 + (line[1].imag-line[0].imag)*(line[0].real-b.real);
	if -EPS <= sa and sa <= EPS: return 0 		 # a in line
	if -EPS <= sb and sb <= EPS: return 0 		 # b in line
	if sa*sb >= 0: return 1           # a,b at same side
	return -1;

while True:
	try: p = list(map(float, input().split(',')))
	except: break
	
	p1 = complex(p[0], p[1])
	p2 = complex(p[2], p[3])
	p3 = complex(p[4], p[5])
	p4 = complex(p[6], p[7])
	if atSameSide(p2, p4, [p1, p3]) == -1 and \
	   atSameSide(p1, p3, [p2, p4]) == -1: print('YES')
	else: print('NO')

Python: def cross(x, y):
    return (x.conjugate() * y).imag

def is_convex(points):
    n = len(points)
    x = points[1] - points[0]
    y = points[2] - points[1]
    c0 = cross(x, y)
    for i in range(1, n):
        x = y
        y = points[(i+2)%n] - points[(i+1)%n]
        if c0 * cross(x, y) < 0:
            return False
    return True
        

import sys

for line in sys.stdin:
    li = list(map(float, line.split(',')))
    p = []
    for i in range(0, len(li), 2):
        p.append(complex(li[i], li[i+1]))
    if is_convex(p):
        print('YES')
    else:
        print('NO')

Python: import sys
def angleis(p1, p2):
    return True if p1[0] * p2[1] - p1[1] * p2[0] > 0 else False

Ps = sys.stdin.readlines()
for P in Ps:
    xa, ya, xb, yb, xc, yc, xd, yd = map(float, P.split(','))
    p = [[xb-xa, yb-ya],[xc-xb, yc-yb],[xd-xc, yd-yc],[xa-xd, ya-yd],[xb-xa, yb-ya]]
    a = []
    for i in range(4):
        a.append(angleis(p[i], p[i+1]))
    if a.count(True) == 0 or a.count(True) == 4:
        print('YES')
    else :
        print('NO')

Python: # -*- coding: utf-8 -*-

import sys
import os
import math


def cross(v1, v2):
    return v1[0] * v2[1] - v1[1] * v2[0]

def sign(v):
    if v >= 0:
        return 1
    else:
        return -1

for s in sys.stdin:
    ax, ay, bx, by, cx, cy, dx, dy = map(float, s.split(','))

    AB = (bx - ax, by - ay)
    BC = (cx - bx, cy - by)
    CD = (dx - cx, dy - cy)
    DA = (ax - dx, ay - dy)

    c0 = cross(AB, BC)
    c1 = cross(BC, CD)
    c2 = cross(CD, DA)
    c3 = cross(DA, AB)

    if sign(c0) == sign(c1) == sign(c2) == sign(c3):
        print('YES')
    else:
        print('NO')

Python: import sys
f = sys.stdin

def take2(iterable):
    i = iter(iterable)
    while True:
        yield next(i), next(i)
def cross(a, b):
    return a.real * b.imag - a.imag * b.real
# 砂時計型の場合は考慮しない
def is_convex(a, b, c, d):
    v1 = cross(a - b, b - c)
    v2 = cross(b - c, c - d)
    v3 = cross(c - d, d - a)
    v4 = cross(d - a, a - b)    
    return 0 < v1 * v2 and 0 < v2 * v3 and 0 < v3 * v4

for line in f:
    a, b, c, d = [x + y *1j for x, y in take2(map(float, line.split(',')))]
    
    print('YES' if is_convex(a,b,c,d) else 'NO')

Python: import sys
def sign(x):
    if x>0: s=1
    elif x<0: s=-1
    else: s=0
    return s

def f(p1,p2,p3):
    x1,y1 = p1
    s = sign((p3[1]-y1)*(p2[0]-x1)-(p2[1]-y1)*(p3[0]-x1))
    return s

for s in sys.stdin:
    D = map(float, s.split(","))
    p1 = D[0:2]; p2 = D[2:4]; p3 = D[4:6]; p4 = D[6:8]
    x = f(p1,p3,p2) != f(p1,p3,p4) and f(p2,p4,p1) != f(p2,p4,p3)
    print ["NO","YES"][x]

Python: import sys
import math
for line in sys.stdin:
    xa,ya,xb,yb,xc,yc,xd,yd = [float(i) for i in line.split(",")]
    
    # 図形の凸性:各頂点における外積を計算し、一つでも符号の異なるものがあれば非凸
    ab = (xb-xa,yb-ya)
    bc = (xc-xb,yc-yb)
    cd = (xd-xc,yd-yc)
    da = (xa-xd,ya-yd)
    va = da[0]*ab[1] - da[1]*ab[0]
    vb = ab[0]*bc[1] - ab[1]*bc[0]
    vc = bc[0]*cd[1] - bc[1]*cd[0]
    vd = cd[0]*da[1] - cd[1]*da[0]
    if all(map(lambda x:x/abs(x) == 1.0,[va,vb,vc,vd])) or all(map(lambda x:x/abs(x) == -1.0,[va,vb,vc,vd])):
        print("YES")
    else:
        print("NO")

Python: import sys

def menseki(x0,y0,x1,y1,x2,y2):
    return 0.5*abs((x1-x0)*(y2-y0)-(x2-x0)*(y1-y0))

def square_menseki(x0,y0,x1,y1,x2,y2,x3,y3):
    return 0.5*abs((x0*y1-y0*x1)+(x1*y2-y1*x2)+(x2*y3-y2*x3)+(x3*y0-y3*x0))

for row in sys.stdin:
    x0,y0,x1,y1,x2,y2,x3,y3 = list(map(float, row.strip().split(',')))
    s = square_menseki(x0,y0,x1,y1,x2,y2,x3,y3)
    if s > menseki(x0,y0,x1,y1,x2,y2) and s > menseki(x0,y0,x1,y1,x3,y3) and s> menseki(x0,y0,x2,y2,x3,y3) and s > menseki(x1,y1,x2,y2,x3,y3):
        print('YES')
    else:
        print('NO')

Python: import sys
for e in sys.stdin:
 e=list(map(float,e.split(',')))
 f=0
 for i in range(0,8,2):
  if(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])<0:f=1
 print(['YES','NO'][f])

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

Python: import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def cross3(a, b, c):
    return (b[0]-a[0])*(c[1]-a[1]) - (b[1]-a[1])*(c[0]-a[0])
def solve():
    for line in readlines():
        xa, ya, xb, yb, xc, yc, xd, yd = map(float, line.split(","))
        P = [(xa, ya), (xb, yb), (xc, yc), (xd, yd)]
        D = []
        for i in range(4):
            p0 = P[i-2]; p1 = P[i-1]; p2 = P[i]
            D.append(cross3(p0, p1, p2))
        if all(e > 0 for e in D) or all(e < 0 for e in D):
            write("YES\n")
        else:
            write("NO\n")
solve()

Python: import math
while True:
    try:
        xa, ya, xb, yb, xc, yc, xd, yd = map(float, input().split(','))
    except:
        break
    vecs = [(xb - xa, yb - ya), (xc - xb, yc - yb), (xd - xc, yd - yc), (xa - xd, ya - yd)]
    angles = [(math.atan2(*vecs[(i + 1) % 4][::-1]) - math.atan2(*vecs[i][::-1])) % (2 * math.pi) for i in range(4)]
    print('YES' if max(angles) < math.pi or min(angles) > math.pi else 'NO')

Python: from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin
from collections import namedtuple
Point = namedtuple('Point', 'x y')

def make_test(p1, p2):
    gradient = (p1.y - p2.y) / (p1.x - p2.x)
    y_intercept = p1.y - gradient * p1.x
    return lambda p: gradient * p.x + y_intercept > p.y

for line in stdin:
    it = (float(s) for s in line.split(','))
    A, B, C, D = (Point(next(it), next(it)) for _ in xrange(4))

    f = make_test(A, C)
    g = make_test(B, D)
    if f(B) == f(D) or g(A) == g(C):
        print('NO')
    else:
        print('YES')