#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  cin>>a>>b;
  string s;
  cin>>s;
  regex code("\\d{"+to_string(a)+"}-\\d{"+to_string(b)+"}");
  if(regex_match(s,code)){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
}