import re

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

s = input().split('-')

print(('Yes' if len(s)==2 and len(s[0])==a else 'No'))
a,b = list(map(int, input().split()))

s = input().split('-')

print(('Yes' if len(s)==2 and len(s[0])==a else 'No'))
import re

a, b = list(map(int, input().split()))
s = input().split("-")
print(("Yes" if len(s) == 2 and len(s[0]) == a else "No"))

a, b = list(map(int, input().split()))
s = input().split("-")
print(("Yes" if len(s) == 2 and len(s[0]) == a else "No"))

-import re -