#include<bits/stdc++.h>
using namespace std;

bool solve{
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if(s.size() != a + b + 1){
    return false;
  }
  for(int i = 0 ; i < s.size() ; i++){
    if(i == a && s[i] != '-'){
      return false;
    }else if(s[i] < '0' || '9' < s[i]){
      return false;
    }
  }
  return true;
}

int main(){
  if(solve()){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}