#Postal Code
a,b=parse.(Int,split(readline()))
c=a+1
d=c+b
s = readline()
x = zeros(Int64,(1,d))
Ans=zeros(Int64,(1,d))
check=zeros(Int64,(1,d))
if s[c] == '-' 
    str = "Yes"
else 
    str="No"
end
for i=1:d
    if i != c && s[i] != '-' 
    x[i]=parse.(Int,string(s[i]))
    [(i != c && typeof(x[i])==Int64) ? Ans[i]=0 : Ans[i]=1] 
    Ans[c] = 0
    elseif i!=c && s[i] =='-' 
    Ans[d]=1
    end
end
if str=="Yes" && Ans == check
    println("Yes")
else
    println("No")
end