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

flag = 0
if len(s) == a+b+1:
    flag = 1

if s[:a] in "-" or s[b:] in "-":
    flag = 0

if s[a] == "-" and flag == 1:
    print('Yes')
else:
    print("No")