#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  for (int i = 0; i < a; i++) {
    if (!('0' <= s[i] && s[i] <= '9')) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (s[a] != '-') {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = a + 1; i < a + b + 1; i++) {
    if (!('0' <= s[i] && s[i] <= '9')) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
