#include <bits/stdc++.h>
using namespace std;
const int maxx = 1505;
int a, b;
string s;
int main() {
  cin >> a >> b;
  cin >> s;
  if (a + b + 1 != s.length()) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < s.length(); i++) {
    if (i != a + 1) {
      if (s[i] != '-') {
        cout << "No" << endl;
        return 0;
      } else if (s[i] < '0' || s[i] > '9') {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
