import sys
num = ['0','1','2','3','4','5','6','7','8','9']
A,B = map(int,input().split())
S = input()
if A+B+1 != len(S):
    print('No')
    sys.exit()
S = [c for c in S]
flag = 0
for i in range(A):
    for j in num:
        if S[i] == j:
            flag = 1
    if flag == 0:
        print('No')
        sys.exit()
if S[A] != '-':
    print('No')
    sys.exit()
for i in range(A+2,A+B+1):
    for j in num:
        if S[i] == j:
            flag = 1
    if flag == 0:
        print('No')
        sys.exit()

print('Yes')