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: def op(a,b):
    return(a[0]*b[1]- a[1]*b[0])

def vec(a,b):
    return(b[0]-a[0],b[1]- a[1])

while True:
    try:
        xa,ya,xb,yb,xc,yc,xd,yd = list(map(float,input().strip().split(',')))
        a = (xa,ya)
        b = (xb,yb)
        c = (xc,yc)
        d = (xd,yd)
        p1 = op(vec(a,b), vec(b,c))
        p2 = op(vec(b,c), vec(c,d))
        p3 = op(vec(c,d), vec(d,a))
        p4 = op(vec(d,a), vec(a,b))
        if (p1 > 0 and p2 > 0 and p3 > 0 and p4 > 0) or (p1 < 0 and p2 < 0 and p3 < 0 and p4 < 0):
            print("YES") 
        else:
            print("NO") 

    except EOFError:
        break

Python: import sys


class Vector(object):
    def __init__(self, _from, to):
        self.x = to[0]-_from[0]
        self.y = to[1]-_from[1]

    def cross(self, other: "Vector") -> float:
        return self.x * other.y - self.y * other.x


for a in (list(map(float, l.split(","))) for l in sys.stdin):
    points = [(x, y) for x, y in zip(a[::2], a[1::2])]
    sign = {Vector(p2, p3).cross(Vector(p2, p1)) > 0
            for p1, p2, p3 in zip(points, points[1:]+points, points[2:]+points)}
    print("YES" if len(sign) == 1 else "NO")

Python: while True:
    try:
        p = list(map(float, input().split(',')))
    except:
        break
    v = [p[i] - p[(i + 2) % 8] for i in range(8)]
    ip = [v[i] * v[(i + 3) % 8] - v[i + 1] * v[(i + 2) % 8] > 0 for i in range(0,8,2)]
    if sum(ip) == 0 or sum(ip) == 4:
        print('YES')
    else:
        print('NO')

Python: import math


def eq(x, y):
    return abs(x - y) <= 10e-10


def get_r(_a, _b, _c):
    return math.acos((-_a ** 2 + _b ** 2 + _c ** 2) / (2 * _b * _c))


def _len(_ax, _ay, _bx, _by):
    return math.sqrt((_ax - _bx) ** 2 + (_ay - _by) ** 2)

try:
    while 1:

        xa,ya,xb,yb,xc,yc,xd,yd = map(float, input().split(','))

        ab = _len(xa,ya,xb,yb)
        bc = _len(xc,yc,xb,yb)
        cd = _len(xc,yc,xd,yd)
        ad = _len(xa,ya,xd,yd)

        bd = _len(xd,yd,xb,yb)
        ac = _len(xa,ya,xc,yc)

        A = get_r(bd, ab, ad)
        B = get_r(ac, ab, bc)
        C = get_r(bd, bc, cd)
        D = get_r(ac, ad, cd)

        if eq(A + B + C + D, 2 * math.pi):
            print("YES")
        else:
            print("NO")

except:
    pass

Python: def judge(p1,p2,p3,p4):
    t1 = (p3[0] - p4[0]) * (p1[1] - p3[1]) + (p3[1] - p4[1]) * (p3[0] - p1[0])
    t2 = (p3[0] - p4[0]) * (p2[1] - p3[1]) + (p3[1] - p4[1]) * (p3[0] - p2[0])
    t3 = (p1[0] - p2[0]) * (p3[1] - p1[1]) + (p1[1] - p2[1]) * (p1[0] - p3[0])
    t4 = (p1[0] - p2[0]) * (p4[1] - p1[1]) + (p1[1] - p2[1]) * (p1[0] - p4[0])
    return t1*t2>0 and t3*t4>0 
while True:
	try:
		x1,y1,x2,y2,x3,y3,x4,y4=map(float, input().split(","))
		A=[x1,y1]
		B=[x2,y2]
		C=[x3,y3]
		D=[x4,y4]
		if judge(A,B,C,D)==False :
			print("NO")
		else:
			print("YES")
	except EOFError:
		break

Python: import fileinput

for line in fileinput.input():
    xa, ya, xb, yb, xc, yc, xd, yd = map(float, line.split(','))
    x = ((yb * xd - yd * xb) * (xc - xa) - (ya * xc - yc * xa) * (xd - xb)) \
        / ((yc - ya) * (xd - xb) - (yd - yb) * (xc - xa))
    print('NO' if (x - xa) * (x - xc) > 0 or (x - xb) * (x - xd) > 0 else 'YES')

Python: import sys
for line in sys.stdin():
    p = list(map(float, line.split(',')))
    v = [p[i] - p[(i + 2) % 8] for i in range(8)]
    ip = [v[j] * v[(j + 3) % 8] - v[j + 1] * v[(j + 2) % 8] > 0 for j in range(0,8,2)]
    if sum(ip) == 0 or sum(ip) == 4:
        print('YES')
    else:
        print('NO')

Python: from math import atan, pi
E = 10**-10

def cross(a0,a1,b0,b1):
    return a0*b1-a1*b0

while(1):
    a = [0 for i in range(2)]
    b = [0 for i in range(2)]
    c = [0 for i in range(2)]
    d = [0 for i in range(2)]
    try:
        a[0],a[1],b[0],b[1],c[0],c[1],d[0],d[1] = [float(i) for i in input().split(",")]
        A = cross((d[1]-a[1]),(d[0]-a[0]),(b[1]-a[1]),(b[0]-a[0]))
        B = cross((c[1]-d[1]),(c[0]-d[0]),(a[1]-d[1]),(a[0]-d[0]))
        C = cross((b[1]-c[1]),(b[0]-c[0]),(d[1]-c[1]),(d[0]-c[0]))
        D = cross((a[1]-b[1]),(a[0]-b[0]),(c[1]-b[1]),(c[0]-b[0]))
        if A*B*C*D < 0:
            print("NO")
        else:
            print("YES")
    except EOFError:
        break

Python: import math
def get_data():
    xa,ya,xb,yb,xc,yc,xd,yd = map(float,input().split(','))
    return xa,ya,xb,yb,xc,yc,xd,yd

def dist(x1,y1,x2,y2):
    d = ((x2-x1)**2 + (y2-y1)**2)**0.5
    return d

def lin(x1,y1,x2,y2):
    m = (y1-y2)/(x1-x2)
    n = (x1*y2-x2*y1)/(x1-x2)
    return m,n

def p_l(x0,y0,m,n):
    d = abs(y0-m*x0-n)/math.sqrt(1+m**2)
    return d

def convex(xa,ya,xb,yb,xc,yc,xd,yd):
    ac = dist(xa,ya,xc,yc)
    bd = dist(xb,yb,xd,yd)
    
    m1,n1 = lin(xb,yb,xd,yd)
    d1 = p_l(xa,ya,m1,n1)
    if ac < d1:
        print('NO')
        return 0
    
    m2,n2 = lin(xb,yb,xd,yd)
    d2 = p_l(xc,yc,m2,n2)
    if ac < d2:
        print('NO')
        return 0

    m3,n3 = lin(xa,ya,xc,yc)
    d3 = p_l(xb,yb,m3,n3)
    if bd < d3:
        print('NO')
        return 0
    
    m4,n4 = lin(xa,ya,xc,yc)
    d4 = p_l(xd,yd,m4,n4)
    if bd < d4:
        print('NO')
        return 0
    
    print('YES')
    return 0

while True:
    try:
        xa,ya,xb,yb,xc,yc,xd,yd = get_data()
        convex(xa,ya,xb,yb,xc,yc,xd,yd)
    except EOFError:
        break

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

Python: import sys

for s in sys.stdin:
	pos = list(map(float, s.split(',')))
	sideB = (pos[3]-pos[1])*(pos[0]-pos[4]) - (pos[2]-pos[0])*(pos[1]-pos[5])
	sideD = (pos[7]-pos[1])*(pos[0]-pos[4]) - (pos[6]-pos[0])*(pos[1]-pos[5])
	abxcd = sideB * sideD
	sideA = (pos[1]-pos[3])*(pos[2]-pos[6]) - (pos[0]-pos[2])*(pos[3]-pos[7])
	sideC = (pos[5]-pos[3])*(pos[2]-pos[6]) - (pos[4]-pos[2])*(pos[3]-pos[7])
	cdxab = sideA * sideC

	if abxcd < 0 and cdxab < 0:
		print("YES")
	else:
		print("NO")