(defmacro input []
  '(concat
     (->> (clojure.string/split (read-line) #"\s")
       (map #(Integer/parseInt %)))
     (clojure.string/split (read-line) #"\s")))

(defn PostalCode [[A B S]]
  (let [r1 (and (<= 1 A) (<= B 5))
        r2 (= (+ 1 A B) (count S))
        r3 (= \- (nth S A))
        r4 (nil? (re-seq #"[^0-9]" (str (apply str (take A S)) (apply str(drop (inc A) S)))))]
    (if (and r1 r2 r3 r4) "Yes" "No")))


(-> (input)
  PostalCode
  println)