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

int main(){
  int a, b;
  string s;
  cin >> a >> b >> s;

  bool ans=s[a]=='-';
  for(int i=0; i<s.size(); i++){
    if(i!=a && !isdigit(s[i])) ans=false;
  }

  if(ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}
