while line = gets
  xa, ya, xb, yb, xc, yc, xd, yd = line.split(",").map(&:to_f)
  v1x = xc - xa
  v1y = yc - ya
  b = v1x*(yb-ya) - v1y*(xb-xa) > 0 ? 1 : -1
  d = v1x*(yd-ya) - v1y*(xd-xa) > 0 ? 1 : -1
  if b * d == 1
    puts "NO"
    next
  end
  v2x = xd - xb
  v2y = yd - yb
  a = v2x*(ya-yb) - v2y*(xa-xb) > 0 ? 1 : -1
  c = v2x*(yc-yb) - v2y*(xc-xb) > 0 ? 1 : -1
  if a * c == 1
    puts "NO"
    next
  end
  puts "YES"
end