a = list(map(int,input().split()))
S = input()
result = "No"
flag = True
if S.count("-"):
    b = list(S.split("-"))
    a.sort()
    b.sort()
elif S.count("-") == 1 and (S.find("-") == 0 or S.find("-") == len(S)-1):
    if sum(a) == len(S)+1:
        result = "Yes"
        flag = False
else:
    flag = False

if not flag == False:
    if a[0] == len(b[0]) and a[1] == len(b[1]):
        result = "Yes"

print(result)
