while gets
  xa, ya, xb, yb, xc, yc, xd, yd = $_.split(',').map(&:to_f)
  vx1 = xb-xa
  vy1 = yb-ya
  vx2 = xc-xa
  vy2 = yc-ya
  vx3 = xd-xa
  vy3 = yd-ya
  t = (vx2*vy3 - vx3*vy2) / (vx1*vx3 - vy1*vx3)
  s = (vx2*vy1 - vy2*vx1) / (vx3*vy1 - vy3*vx1)
  if t > 0 && s > 0 && t+s > 1
    puts"YES"
  else
    puts"NO"
  end
end