A,B = (int(i) for i in input().split())
S = input()

'''
if(S.find("-")==A):
    print("Yes")
else:
    print("No")
'''

if(('-' in S) and (A+B+1==len(S))):
    if(S.count("-") != 1):
        print("No")
    else:
        print("Yes")
else:
    print("No")
