import sys

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

if not S[0:A-1].isdecimal():
    print('No')
    sys.exit()

if list(S)[A] != '-':
    print('No')
    sys.exit()

if not S[A+1:].isdecimal():
    print('No')
    sys.exit()

else:
    print('Yes')