def solver(a, b, c, d, e, f)
  if a * b * d * e != 0
    return ((c - f * (b / e)) / (a - d * (b / e))), ((c - f * (a / d)) / (b - e * (a / d)))
  else
    if a == 0
      return ((f - e * (c / b)) / d), (c / b)
    elsif b == 0
      return (c / a), ((f - d * (c / a)) / e)
    elsif d == 0
      return ((c - b * (f / e)) / a), (f / e)
    else
      return (f / d), ((c - a * (f / d)) / b)
    end
  end
end
def in_triangle?(a, b, c, d, e, f, g, h)
  x, y = solver(h - b, a - g, a * h - b * g, f - d, c - e, c * f - d * e)
  if (e < x and x < c) or (c < x and x < e) or (d < y and y < f) or (f < y and y < d)
    return true
  else
    return false
  end
end
while arg = gets
  arg = arg.split(",").map(&:to_f)
  bool = !in_triangle?(*arg)
  3.times do
    arg.push(*arg.shift(2))
    bool &= !in_triangle?(*arg)
  end
  if !in_triangle?(*arg)
    puts "YES"
  else
    puts "NO"
  end
end