import re



A, B = [int(x) for x in input().split()]

S = eval(input())



match = re.match('^[0-9]{' + str(A) + '}-[0-9]{' + str(B) + '}$', S)



if match:

	print('Yes')

else:

    print('No')

import re

A, B = [x for x in input().split()]

print(('Yes' if re.match('^[0-9]{' + A + '}-[0-9]{' + B + '}$', eval(input())) else 'No'))

import re

A, B = [int(x) for x in input().split()]
S = eval(input())
match = re.match("^[0-9]{" + str(A) + "}-[0-9]{" + str(B) + "}$", S)
if match:
    print("Yes")
else:
    print("No")

import re

A, B = [x for x in input().split()]
print(
    ("Yes" if re.match("^[0-9]{" + A + "}-[0-9]{" + B + "}$", eval(input())) else "No")
)

-A, B = [int(x) for x in input().split()] -S = eval(input()) -match = re.match("^[0-9]{" + str(A) + "}-[0-9]{" + str(B) + "}$", S) -if match: -    print("Yes") -else: -    print("No") +A, B = [x for x in input().split()] +print( +    ("Yes" if re.match("^[0-9]{" + A + "}-[0-9]{" + B + "}$", eval(input())) else "No") +)