def solve():
    a,b = map(int, input().split())
    s = input()

    for i in s[0:a]:
        if '0' > i or i > '9':
            print("NO")
            return
    if s[a] != '-':
        print("NO")
        return
    for i in s[a+1:a+b+1]:
        if '0' > i or i > '9':
            print("NO")
            return
    print("YES")
    return

solve()
