#include <bits/stdc++.h>
using namespace std;
using std::stringstream;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline std::string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class F, class T>
inline void convert(const F &f, T &t) {
  stringstream ss;
  ss << f;
  ss >> t;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const static int INF = 0x3f3f3f3f;
const static long long INFL = 0x3f3f3f3f3f3f3f3fLL;
const static double EPS = 1e-9;
const static long long MOD = 1000000007LL;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int main(int argc, char *argv[]) {
  int a, b;
  string s;
  string ans = "YES";
  cin >> a >> b >> s;
  for (int i = 0; i < s.size(); i++) {
    if (i < a || i > a) {
      if (s[i] == '-') {
        ans = "NO";
        break;
      }
    } else {
      if (s[i] != '-') {
        ans = "NO";
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
