a, b = map(int, input().split())
s = input()
try:
    A = int(s[0:a])
    h = s[a]
    B = s[a+1:]
    if h != '-':
        print("No")
    else:
        print("Yes")
except ValueError:
    print("No")