a, b = map(int, input().split())
s = input()
l = list(range(10))
for i in range(len(s)):
    if i == 3 and s[i] != "-":
        print("No")
        exit()
    else:
        if s[i] not in l:
            print("No")
            exit()
print("Yes")
