Buggy python submission (verdict: Runtime Error):
#encoding=utf-8
import sys

def inp():
	for i in sys.stdin:
		xa,ya,xb,yb,xc,yc,xd,yd = map(float, i.split(","))	
		print hantei(xa,ya,xb,yb,xc,yc,xd,yd)

def hantei(xa,ya,xb,yb,xc,yc,xd,yd):
	count = [0,0,0,0]
	a1 = (ya - yc)/(xa - yc)
	b1 = ya - a1*xa

	a2 = (yb - yd)/(xb - xd)
	b2 = yb - a2*xb

	if xb*a1+b1 > yb:
		count[0] += 1
	else:
		count[1] += 1
	if xd*a1+b1 > yd:
		count[0] += 1
	else:
		count[1] += 1
	if xa*a2+b2 > ya:
		count[2] += 1
	else:
		count[3] += 1
	if xc*a2+b2 > yc:
		count[2] += 1
	else:
		count[3] += 1

	for i in xrange(4):
		if count[i] != 1:
			return "NO"
		else:
			pass
	return "YES"

if __name__ == "__main__":
	inp()

Fixed submission:
def S(x1,y1,x2,y2,x3,y3):
    return ((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2.0
import sys
for dataset in sys.stdin:
    xa,ya,xb,yb,xc,yc,xd,yd=map(float,dataset.split(","))
    ABC=S(xa,ya,xb,yb,xc,yc)
    BCD=S(xb,yb,xc,yc,xd,yd)
    CDA=S(xc,yc,xd,yd,xa,ya)
    DAB=S(xd,yd,xa,ya,xb,yb)
    if ABC>0 and BCD>0 and CDA>0 and DAB>0:
        print "YES"
    elif ABC<0 and BCD<0 and CDA<0 and DAB<0:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
import sys

def inp():
	for i in sys.stdin:
		xa,ya,xb,yb,xc,yc,xd,yd = map(float, i.split(","))	
		print hantei(xa,ya,xb,yb,xc,yc,xd,yd)

def hantei(xa,ya,xb,yb,xc,yc,xd,yd):
	count = [0,0,0,0]
	a1 = (ya - yc)/(xa - yc)
	b1 = ya - a1*xa

	a2 = (yb - yd)/(xb - xd)
	b2 = yb - a2*xb

	if xb*a1+b1 > yb:
		count[0] += 1
	else:
		count[1] += 1
	if xd*a1+b1 > yd:
		count[0] += 1
	else:
		count[1] += 1
	if xa*a2+b2 > ya:
		count[2] += 1
	else:
		count[3] += 1
	if xc*a2+b2 > yc:
		count[2] += 1
	else:
		count[3] += 1

	for i in xrange(4):
		if count[i] != 1:
			return "NO"
		else:
			pass
	return "YES"

if __name__ == "__main__":
	inp()

Fixed submission:
def S(x1,y1,x2,y2,x3,y3):
    return ((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2.0
import sys
for dataset in sys.stdin:
    xa,ya,xb,yb,xc,yc,xd,yd=map(float,dataset.split(","))
    ABC=S(xa,ya,xb,yb,xc,yc)
    BCD=S(xb,yb,xc,yc,xd,yd)
    CDA=S(xc,yc,xd,yd,xa,ya)
    DAB=S(xd,yd,xa,ya,xb,yb)
    if ABC>0 and BCD>0 and CDA>0 and DAB>0:
        print "YES"
    elif ABC<0 and BCD<0 and CDA<0 and DAB<0:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
#encoding=utf-8
import sys

def inp():
	for i in sys.stdin:
		xa,ya,xb,yb,xc,yc,xd,yd = map(float, i.split(","))	
		print hantei(xa,ya,xb,yb,xc,yc,xd,yd)

def hantei(xa,ya,xb,yb,xc,yc,xd,yd):
	count = [0,0,0,0]
	a1 = (ya - yc)/(xa - yc)
	b1 = ya - a1*xa

	a2 = (yb - yd)/(xb - xd)
	b2 = yb - a2*xb

	if xb*a1+b1 > yb:
		count[0] += 1
	else:
		count[1] += 1
	if xd*a1+b1 > yd:
		count[0] += 1
	else:
		count[1] += 1
	if xa*a2+b2 > ya:
		count[2] += 1
	else:
		count[3] += 1
	if xc*a2+b2 > yc:
		count[2] += 1
	else:
		count[3] += 1

	for i in xrange(4):
		if count[i] != 1:
			return "NO"
		else:
			pass
	return "YES"

inp()

Fixed submission:
def S(x1,y1,x2,y2,x3,y3):
    return ((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2.0
import sys
for dataset in sys.stdin:
    xa,ya,xb,yb,xc,yc,xd,yd=map(float,dataset.split(","))
    ABC=S(xa,ya,xb,yb,xc,yc)
    BCD=S(xb,yb,xc,yc,xd,yd)
    CDA=S(xc,yc,xd,yd,xa,ya)
    DAB=S(xd,yd,xa,ya,xb,yb)
    if ABC>0 and BCD>0 and CDA>0 and DAB>0:
        print "YES"
    elif ABC<0 and BCD<0 and CDA<0 and DAB<0:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
#encoding=utf-8
import sys


def hantei(xa,ya,xb,yb,xc,yc,xd,yd):
	count = [0,0,0,0]
	a1 = (ya - yc)/(xa - yc)
	b1 = ya - a1*xa

	a2 = (yb - yd)/(xb - xd)
	b2 = yb - a2*xb

	if xb*a1+b1 > yb:
		count[0] += 1
	else:
		count[1] += 1
	if xd*a1+b1 > yd:
		count[0] += 1
	else:
		count[1] += 1
	if xa*a2+b2 > ya:
		count[2] += 1
	else:
		count[3] += 1
	if xc*a2+b2 > yc:
		count[2] += 1
	else:
		count[3] += 1

	for i in xrange(4):
		if count[i] != 1:
			return "NO"
		else:
			pass
	return "YES"

for i in sys.stdin:
	xa,ya,xb,yb,xc,yc,xd,yd = map(float, i.split(","))	
	print hantei(xa,ya,xb,yb,xc,yc,xd,yd)

Fixed submission:
def S(x1,y1,x2,y2,x3,y3):
    return ((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2.0
import sys
for dataset in sys.stdin:
    xa,ya,xb,yb,xc,yc,xd,yd=map(float,dataset.split(","))
    ABC=S(xa,ya,xb,yb,xc,yc)
    BCD=S(xb,yb,xc,yc,xd,yd)
    CDA=S(xc,yc,xd,yd,xa,ya)
    DAB=S(xd,yd,xa,ya,xb,yb)
    if ABC>0 and BCD>0 and CDA>0 and DAB>0:
        print "YES"
    elif ABC<0 and BCD<0 and CDA<0 and DAB<0:
        print "YES"
    else:
        print "NO"