def ipt(N=0,switch=0):
    if N == 0:
        return list(map(int,input().split()))
    else:
        if switch==0:
            return [list(map(int,input().split())) for _ in range(N)]
        else:
            return [int(input()) for _ in range(N)]

a,b=ipt()
s=input()

flag=0
for i in range(a):
    if s[i] == "-":
        flag=1
        break

if s[a] != "-":
    flag=1
        
for i in range(a+1,b+1):
    if s[i] == "-":
        flag=1
        break
if flag==0:
    print("Yes")
else:
    print("No")