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

sl = s.split('-')
if len(sl) != 2:
    print('No')
elif ( sl[0].isdigit() and len(sl[0]) ) and ( sl[1].isdigit() and len(sl[1]) ):
   print('Yes')
else:
    print('No')