import Foundation
func toTuple<T>(_ args: [T]) -> (T, T) { (args[0], args[1]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let (a, b) = toTuple(readInts())
let s = readLine()!.split(separator: "-")
guard s.count == 2 else { print("No"); exit(0) }
if s[0].count == a , s[1].count == b{
  print("Yes")
} else {
  print("No")
}