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