A, B = map(int, input().split())
S = input()
ans = "Yes"
digit = [chr(ord('0') + i) for i in range(10)]
if S[A] != "-":
    ans = "No"
if not all([c in digit for c in S[:A]]):
    ans = "No"
if not all([c in digit for c in S[B:]]):
    ans = "No"
print(ans)
