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

int main() {
  
  int a;
  cin >> a;
  int b;
  cin >> b;
  
  string s;
  cin >> s;
  
  int s=1;
  for (int i=0; i<s.size(); i++) {
    if (i==a) continue;
    else if (s.at(i)=='-') s*=0;
  }
  
  if (s==1 && s.at(a)=='-') cout << "Yes" << endl;
  else cout << "No" << endl;
}