import re

a, b = list(map(int, input().split()))

s = eval(input())

if re.search('\d+',s[:a]) and s[a] == "-" and re.search('\d+',s[a+1:]):

	print ("Yes")

else:

	print ("No")

a, b = list(map(int, input().split()))

s = eval(input())

if "-" not in s[:a] and s[a] == "-" and "-" not in s[a+1:]:

	print ("Yes")

else:

	print ("No")
import re

a, b = list(map(int, input().split()))
s = eval(input())
if re.search("\d+", s[:a]) and s[a] == "-" and re.search("\d+", s[a + 1 :]):
    print("Yes")
else:
    print("No")

a, b = list(map(int, input().split()))
s = eval(input())
if "-" not in s[:a] and s[a] == "-" and "-" not in s[a + 1 :]:
    print("Yes")
else:
    print("No")

-import re - -if re.search("\d+", s[:a]) and s[a] == "-" and re.search("\d+", s[a + 1 :]): +if "-" not in s[:a] and s[a] == "-" and "-" not in s[a + 1 :]: