#include <bits/stdc++.h>
using namespace std;
bool isnum(char c) {
  if (c >= '0' && c <= '9') return true;
  return false;
}
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 = 0; i < s.length(); i++) {
    if (i != a) {
      if (s[i] != '-') {
        cout << "No\n";
        return 0;
      }
    } else if (!isnum(s[i])) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}
