void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  int a, b; rd(a, b);
  auto s=readln.chomp.to!(char[]);

  if(count(s, '-')!=1){writeln("No"); return;}
  if(s[a]=='-') writeln("Yes");
  else writeln("No");
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}
void wr(T...)(T x){
  import std.stdio;
  foreach(e; x) write(e, " ");
  writeln();
}