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

if s.count('-') != 1:
    print("No")

elif s[a] == "-":
    #print(s.replace('-', ''))
    if s.replace('-', '').isdecimal():
        print("Yes")
    else:
        print("No")