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

s = input()

if len(s) > 9:
    print("No")
    exit()

if s[a] != "-":
    print("No")
    exit()

if (s[:a] + s[a+1:]).isnumeric() != True:
    print("No")
    exit()

print("Yes")