readlines.each do |l|
  xa,ya,xb,yb,xc,yc,xd,yd = l.split(",").map(&:to_f)
  v1x,v1y = xb-xa, yb-ya
  v2x,v2y = xd-xa, yd-ya
  v3x,v3y = xc-xa, yc-ya
  t = (v3x*v2y - v3y*v2x)/(v1x*v2y - v1y*v2x)
  u = (v3x*v1y - v3y*v1x)/(v2x*v1y - v2y*v1x)
  puts t>0 && u>0 && t+u>1 ? "YES" : "NO"
end