A, B = map(int, input().split())
S = input()

if S[A] != "-" or not S[:A].isdecimal() or not S[B:].isdecimal():
    print("No")
    exit()

if len(S[:A]) != A or len(S[B:]) != B:
    print("No")
    exit()
print("Yes")

