A,B = gets.split.map(&:to_i)
S = gets.chomp
leng = S.length

x = 0
y = 0

if S[A] == "-" && leng == A+B+1
 x = 1
end

SS = S.delete("-")
for i in 0..(leng-1)
 if S[i] != "-"
  y = 1
 end
end

if x == 1 && y == 1
 puts("Yes")
 else puts("No")
end