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