a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if int(s[:a]) is int and int(s[a+1:]) is int :
            print("Yes")
    except :
        print("No")
else :
    print("No")