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

if len(s) == a + b + 1 and s[a] == '-':
    ss = s.split('-', 1)
    print(ss)
    if len(ss) == 2 and len(ss[0]) == a and len(ss[1]) == b:
        if ss[0].isdecimal() and s[1].isdecimal():
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')