a, b = list(input().split())
s = input()

sl = s.split('-')
try:
    if ( sl[0].isdigit() and len(sl[0]) ) and ( sl[1].isdigit() and len(sl[1]) ):
       print('Yes')
    else:
        print('No')
# no hyphon in the given strings
except IndexError:
    print('No')