import sequtils, strutils
var
    ab:seq[int] = readLine(stdin).split(" ").map(parseInt)
    s:seq[char] = toSeq(readLine(stdin).items)
    i:int = -1
echo s
proc main():string =
    if not(s[ab[0]] == '-'):
        return "No"
    for c in s:
        i = i + 1
        if (i == ab[0]):
            continue
        elif not(isDigit(c)):
            return "No"
    return "Yes"
echo main()