#include <bits/stdc++.h>
const long long maxn = 1e6 + 5;
const long long w = 1e8;
using namespace std;
int a, b;
string s;
inline void init() {
  cin >> a >> b;
  cin.ignore();
  cin >> s;
}
inline void solve() {
  for (int i = 0; i < s.length(); i++) {
    if (i == a) {
      if (s[i] != '-') {
        cout << "NO";
        return;
      }
    } else {
      if (s[i] < '0' || s[i] > '9') {
        cout << "NO";
        return;
      }
    }
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  init();
  solve();
  return 0;
}
