a,b = map(int,input().split())
s = input()
if len(s) == a + b + 1:
    if s[a] == "-":
        s = s.replace("-","")
        print(s)
        if s.isdecimal():
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")