#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0, b = 0;
  string s;
  bool cumple = true;
  cin >> a >> b;
  cin >> s;
  int total = a + b + 1;
  if (s.length() != total) {
    cout << "NO" << endl;
    return 0;
  }
  if (s[a] != '-') {
    cumple = false;
  }
  for (int i = 0; i < s.length(); i++) {
    if (!isdigit(s[i]) && i != a) {
      cumple = false;
    }
  }
  if (cumple)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
