A, B = io.read("*n", "*n", "*l")
S = io.read()
if string.gmatch(S, string.rep("%d", A).."-"..string.rep("%d", B)) and string.sub(S, A+1, A+1) == "-" and #S == A+B+1 then
    print("Yes")
else
    print("No")
end