import sys

a,b = (int(_) for _ in input().split())
s = str(input())

if '-' not in s:
    print("No")
    sys.exit(0)

s1,s2 = s.split('-',1)
if a == len(s1) and b == len(s2):
    print("Yes")
else:
    print("No")