a,b=map(int,input().split())
s=input()
first,second = s.split("-")
answer = len(first) ==a and len(second) == b
answer = answer and "-" not in first and "-" not in second
print("Yes" if answer else "No")