a,b = map(int, input().split())
s = input()

try:
    if '-' not in s: raise 
    sa, sb = map(int, s.split('-'))
#     print(sa, sb)
    if len(sa)==a and len(sb)==b:
        print('Yes')
except ValueError:
    print('No')