A, B = map(int, input().split())
S = str(input())
s = list(S)
No = 0
if A + B + 1 != len(S):
    print('No')
    No = 1
if No == 0:
    for i in range(A):
        if s[i] == '-':
            print('No')
            No = 1
if No == 0:
    for i in range(B):
        if s[A + i + 1] == '-':
            print('No')
            No = 1
if No == 0:
    if s[A] == '-': print('Yes')
    else: print('No')
