Point = Struct.new(:x, :y)
class Point
  def -(other)
    self.class.new(self.x - other.x, self.y - other.y)
  end
end
while ln = gets
  points = ln.split(',').map(&:to_f).each_slice(2).
    each_with_object([]){|(x, y), memo| memo << Point.new(x, y)}

  edges = (points + points.values_at(0)).each_cons(2).map{|s, t| t - s}

  cps = (edges + edges.values_at(0)).each_cons(2).map{|a, b| a.x * b.y - b.x * a.y > 0}

  puts cps.uniq.size == 1 ? 'YES':'NO'
end
