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