#!ruby -pl
xa,ya,xb,yb,xc,yc,xd,yd=$_.split(?,).map &:to_i
xab=xb-xa
yab=yb-ya
xbc=xc-xb
ybc=yc-yb
xcd=xd-xc
ycd=yd-yc
xda=xa-xd
yda=ya-yd
zabc=xab*ybc-xbc*yab
zbcd=xbc*ycd-xcd*ybc
zcda=xcd*yda-xda*ycd
zdab=xda*yab-xab*yda
$_=zabc>0&&zbcd>0&&zcda>0&&zdab>0||zabc<0&&zbcd<0&&zcda<0&&zdab<0?:YES: :NO