#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;
int main(){
  int a,b;
  string s;
  cin >> a >> b;
  cin >> s;
  if(s.compare(a+1,1,"-")==0 ){
    if(all_of(0,a,isdigit)){
      if(all_of(a+1,b,isdigit)){
        cout << "Yes";
      }
    }
  }else{
    cout << "No";
  }
  return 0;
}
  
